Follow symlinks when looking for disc images (#78)
This commit is contained in:
parent
fa5068fd6d
commit
8823c2225e
|
@ -2067,7 +2067,8 @@ pub fn find_object_base(config: &ProjectConfig) -> Result<ObjectBase> {
|
||||||
// Search for disc images in the object base directory
|
// Search for disc images in the object base directory
|
||||||
for result in fs::read_dir(&base)? {
|
for result in fs::read_dir(&base)? {
|
||||||
let entry = result?;
|
let entry = result?;
|
||||||
if entry.file_type()?.is_file() {
|
// Use fs::metadata to follow symlinks
|
||||||
|
if fs::metadata(entry.path())?.file_type().is_file() {
|
||||||
let path = check_path_buf(entry.path())?;
|
let path = check_path_buf(entry.path())?;
|
||||||
let mut file = open_file(&path, false)?;
|
let mut file = open_file(&path, false)?;
|
||||||
let format = nodtool::nod::Disc::detect(file.as_mut())?;
|
let format = nodtool::nod::Disc::detect(file.as_mut())?;
|
||||||
|
|
Loading…
Reference in New Issue