From 8823c2225e0b6eeef407534f369954372bee0321 Mon Sep 17 00:00:00 2001 From: cadmic Date: Thu, 17 Oct 2024 23:37:54 -0700 Subject: [PATCH] Follow symlinks when looking for disc images (#78) --- src/cmd/dol.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmd/dol.rs b/src/cmd/dol.rs index 5255221..53c060d 100644 --- a/src/cmd/dol.rs +++ b/src/cmd/dol.rs @@ -2067,7 +2067,8 @@ pub fn find_object_base(config: &ProjectConfig) -> Result { // Search for disc images in the object base directory for result in fs::read_dir(&base)? { 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 mut file = open_file(&path, false)?; let format = nodtool::nod::Disc::detect(file.as_mut())?;