Skip to content

Commit f1a5b64

Browse files
authored
Merge pull request ogham#378 from LlinksRechts/master
fixed git status not working in directories containing '../'
2 parents 2e0e29d + 2fc56d4 commit f1a5b64

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/fs/feature/git.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ fn reorient(path: &Path) -> PathBuf {
268268
match current_dir() {
269269
Err(_) => Path::new(".").join(&path),
270270
Ok(dir) => dir.join(&path),
271-
}
271+
}.canonicalize().unwrap() // errors can be ignored here because they only occur if
272+
// the path does not exist / a component is not a folder
272273
}
273274

274275
/// The character to display if the file has been modified, but not staged.

0 commit comments

Comments
 (0)