Skip to content

Commit

Permalink
fix: fix error in is_tdf
Browse files Browse the repository at this point in the history
  • Loading branch information
mobiusklein committed Feb 1, 2025
1 parent a7a48d5 commit af69cd0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/io/tdf/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1409,15 +1409,17 @@ pub fn is_tdf<P: AsRef<Path>>(path: P) -> bool {
return false;
}

if !path.join("analysis.tdf").exists() {
let tdf_path = path.join("analysis.tdf");

if !tdf_path.exists() {
return false;
}

if !path.join("analysis.tdf_bin").exists() {
return false;
}

if MetadataReader::new(path).is_err() {
if MetadataReader::new(tdf_path).is_err() {
return false;
}
return true;
Expand Down

0 comments on commit af69cd0

Please sign in to comment.