Explorar o código

Translate Windows path separators to slashes.

Jelmer Vernooij %!s(int64=8) %!d(string=hai) anos
pai
achega
81b451334e
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      dulwich/ignore.py

+ 2 - 0
dulwich/ignore.py

@@ -278,6 +278,8 @@ class IgnoreFilterManager(object):
         if os.path.isabs(path):
             path = os.path.relpath(path, self._top_path)
         filters = [(0, f) for f in self._global_filters]
+        if os.path.sep != '/':
+            path = path.replace(os.path.sep, '/')
         parts = path.split('/')
         for i in range(len(parts)+1):
             dirname = '/'.join(parts[:i])