From 416daa0d11d6146e00131cf668998656186aef6a Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sat, 25 Feb 2017 11:27:09 +0100 Subject: fix(refs): don't assume linux path separator Instead, work with os.sep. Fixes #586 --- git/refs/symbolic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/refs') diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index 3c6b78e5..22b7c53e 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -574,7 +574,7 @@ class SymbolicReference(object): # walk loose refs # Currently we do not follow links for root, dirs, files in os.walk(join_path_native(repo.git_dir, common_path)): - if 'refs/' not in root: # skip non-refs subfolders + if 'refs' not in root.split(os.sep): # skip non-refs subfolders refs_id = [d for d in dirs if d == 'refs'] if refs_id: dirs[0:] = ['refs'] -- cgit v1.2.1