Skip to content

Commit

Permalink
Follow symlinks when looking for disc images (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
cadmic authored Oct 18, 2024
1 parent fa5068f commit 8823c22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cmd/dol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2067,7 +2067,8 @@ pub fn find_object_base(config: &ProjectConfig) -> Result<ObjectBase> {
// 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())?;
Expand Down

0 comments on commit 8823c22

Please sign in to comment.