Explorar o código

Usability improvement: automatic normalization of relative paths during collection.

avkonst %!s(int64=11) %!d(string=hai) anos
pai
achega
69d565aacd
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      mainline/ext/std/tools/collect.py

+ 2 - 0
mainline/ext/std/tools/collect.py

@@ -115,6 +115,8 @@ class DirectoryReader():
         def run_per_file(plugin, fname, full_path):
             exit_code = 0
             norm_path = re.sub(r'''[\\]''', "/", full_path)
+            if os.path.isabs(norm_path) == False and norm_path.startswith('./') == False:
+                norm_path = './' + norm_path
             if plugin.is_file_excluded(norm_path) == False:
                 if os.path.isdir(full_path):
                     if plugin.non_recursively == False: