Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/mft.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmer BenAmram <omerbenamram@gmail.com>2020-04-15 01:00:11 +0300
committerGitHub <noreply@github.com>2020-04-15 01:00:11 +0300
commit48e2c6f7d16f99d34f3bb63b11bfbd346c75440b (patch)
tree9605e180f7a68d372bc1f47a9bd85dff528c99eb
parent5c3ce2e6933160c2b3418a567060cdcea26050b9 (diff)
parent3cb88cd8e6de59178efed756c6768bb30ea100f7 (diff)
Merge pull request #42 from omerbenamram/bugfix/only-consider-directories-as-valid-parents
fix
-rw-r--r--azure-pipelines.yml2
-rw-r--r--src/mft.rs3
2 files changed, 3 insertions, 2 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 7c2a1d7..cb9ca6d 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -11,7 +11,7 @@ strategy:
target: 'x86_64-pc-windows-msvc'
rustup_toolchain: stable
mac-stable:
- imageName: 'macos-10.13'
+ imageName: 'macOS-10.14'
target: 'x86_64-apple-darwin'
rustup_toolchain: stable
linux-stable:
diff --git a/src/mft.rs b/src/mft.rs
index 4cb2c91..40bc8cd 100644
--- a/src/mft.rs
+++ b/src/mft.rs
@@ -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(),