diff options
author | Omer Ben-Amram <omerbenamram@gmail.com> | 2020-04-15 00:51:53 +0300 |
---|---|---|
committer | Omer Ben-Amram <omerbenamram@gmail.com> | 2020-04-15 00:51:53 +0300 |
commit | 782976f4b68d696d0271a6f33281fe6499ac5752 (patch) | |
tree | 7267582f9a2fc2ad513f92c2d8d9db9a0bebee02 | |
parent | 5c3ce2e6933160c2b3418a567060cdcea26050b9 (diff) |
fix
-rw-r--r-- | src/mft.rs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -99,7 +99,8 @@ impl<T: ReadSeek> MftParser<T> { } else { let path = match self.get_entry(parent_entry_id).ok() { Some(parent) => match self.get_full_path_for_entry(&parent) { - Ok(Some(path)) => path, + Ok(Some(path)) if parent.is_dir() => path, + Ok(Some(_)) => PathBuf::from("[Unknown]"), // I have a parent, which doesn't have a filename attribute. // Default to root. _ => PathBuf::new(), |