Pārlūkot izejas kodu

Don't use os.path.sep since that changes with the platform

We might want to convert all paths to POSIX to make this work
with platform specific paths (Windows paths :P)
Segev Finer 7 gadi atpakaļ
vecāks
revīzija
a5afa0e1ba
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 3 3
      dulwich/ignore.py

+ 3 - 3
dulwich/ignore.py

@@ -243,11 +243,11 @@ 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]
-        parts = path.split(os.path.sep)
+        parts = path.split('/')
         for i in range(len(parts)+1):
-            dirname = os.path.sep.join(parts[:i])
+            dirname = '/'.join(parts[:i])
             for s, f in filters:
-                relpath = os.path.sep.join(parts[s:i])
+                relpath = '/'.join(parts[s:i])
                 status = f.is_ignored(relpath)
                 if status is not None:
                     return status