diff options
author | Omer BenAmram <omerbenamram@gmail.com> | 2020-04-15 01:00:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 01:00:11 +0300 |
commit | 48e2c6f7d16f99d34f3bb63b11bfbd346c75440b (patch) | |
tree | 9605e180f7a68d372bc1f47a9bd85dff528c99eb | |
parent | 5c3ce2e6933160c2b3418a567060cdcea26050b9 (diff) | |
parent | 3cb88cd8e6de59178efed756c6768bb30ea100f7 (diff) |
Merge pull request #42 from omerbenamram/bugfix/only-consider-directories-as-valid-parents
fix
-rw-r--r-- | azure-pipelines.yml | 2 | ||||
-rw-r--r-- | src/mft.rs | 3 |
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: @@ -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(), |