Skip to content

Commit 8823c22

Browse files
authored
Follow symlinks when looking for disc images (#78)
1 parent fa5068f commit 8823c22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cmd/dol.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,8 @@ pub fn find_object_base(config: &ProjectConfig) -> Result<ObjectBase> {
20672067
// Search for disc images in the object base directory
20682068
for result in fs::read_dir(&base)? {
20692069
let entry = result?;
2070-
if entry.file_type()?.is_file() {
2070+
// Use fs::metadata to follow symlinks
2071+
if fs::metadata(entry.path())?.file_type().is_file() {
20712072
let path = check_path_buf(entry.path())?;
20722073
let mut file = open_file(&path, false)?;
20732074
let format = nodtool::nod::Disc::detect(file.as_mut())?;

0 commit comments

Comments
 (0)