浏览代码

Usability improvement: automatic normalization of relative paths during collection.

avkonst 11 年之前
父节点
当前提交
69d565aacd
共有 1 个文件被更改,包括 2 次插入0 次删除
  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: