diff options
author | Benjamin Sago <ogham@users.noreply.github.com> | 2019-07-15 04:00:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-15 04:00:11 +0100 |
commit | f1a5b646fe300e6058317ff7b36d9286dea74cbf (patch) | |
tree | 60c8868878c63aa72fd23e4893c8d36bee81d5a2 | |
parent | 2e0e29da2284f956a6af1b15f3702b1e20dff76e (diff) | |
parent | 2fc56d45ca1074f3135f16e35f53646f8262191f (diff) |
Merge pull request #378 from LlinksRechts/master
fixed git status not working in directories containing '../'
-rw-r--r-- | src/fs/feature/git.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fs/feature/git.rs b/src/fs/feature/git.rs index e07ce91..052a8f8 100644 --- a/src/fs/feature/git.rs +++ b/src/fs/feature/git.rs @@ -268,7 +268,8 @@ fn reorient(path: &Path) -> PathBuf { match current_dir() { Err(_) => Path::new(".").join(&path), Ok(dir) => dir.join(&path), - } + }.canonicalize().unwrap() // errors can be ignored here because they only occur if + // the path does not exist / a component is not a folder } /// The character to display if the file has been modified, but not staged. |