File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ impl FromIterator<PathBuf> for GitCache {
53
53
else {
54
54
match GitRepo :: discover ( path) {
55
55
Ok ( r) => {
56
- if let Some ( mut r2) = git. repos . iter_mut ( ) . find ( |e| e. has_workdir ( & r. workdir ) ) {
56
+ if let Some ( r2) = git. repos . iter_mut ( ) . find ( |e| e. has_workdir ( & r. workdir ) ) {
57
57
debug ! ( "Adding to existing repo (workdir matches with {:?})" , r2. workdir) ;
58
58
r2. extra_paths . push ( r. original_path ) ;
59
59
continue ;
@@ -268,7 +268,8 @@ fn reorient(path: &Path) -> PathBuf {
268
268
match current_dir ( ) {
269
269
Err ( _) => Path :: new ( "." ) . join ( & path) ,
270
270
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
272
273
}
273
274
274
275
/// The character to display if the file has been modified, but not staged.
You can’t perform that action at this time.
0 commit comments