Ver Fonte

Merge pull request #378 from LlinksRechts/master

fixed git status not working in directories containing '../'
Benjamin Sago há 6 anos atrás
pai
commit
f1a5b646fe
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      src/fs/feature/git.rs

+ 2 - 1
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.