File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -398,7 +398,7 @@ def _calculate_file_hash(self, filename):
398
398
def _get_git_repo (self , dirname ):
399
399
if not os .path .isabs (dirname ):
400
400
dirname = os .path .abspath (os .path .join (_PWD , dirname ))
401
- while dirname != '/' :
401
+ while dirname != os . path . normpath ( os . path . abspath ( os . path . sep )) :
402
402
if os .path .isdir (os .path .join (dirname , '.git' )):
403
403
return git .Repo (dirname )
404
404
dirname = os .path .normpath (os .path .abspath (os .path .join (dirname , '..' )))
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def normalize_file_path(path):
36
36
if not os .path .isabs (path ):
37
37
path = os .path .abspath (os .path .join (_HERE , path ))
38
38
dirname = os .path .normpath (path )
39
- while dirname != '/' :
39
+ while dirname != os . path . normpath ( os . path . abspath ( os . path . sep )) :
40
40
for special_dir in _SPECIAL_DIRS :
41
41
if os .path .isdir (os .path .join (dirname , special_dir )):
42
42
return os .path .normpath (os .path .relpath (path , dirname ))
You can’t perform that action at this time.
0 commit comments