beremiz

704c7036db85
Parents 703ddaf48b00
Children f974476b16bb
skip hidden files and directories on permission check

To fix problems with git, because .git subdirectory contains
read-only repository objects.
  • +5 -3
    util/misc.py
  • --- a/util/misc.py Fri Jul 14 18:26:20 2017 +0300
    +++ b/util/misc.py Fri Jul 28 15:34:11 2017 +0300
    @@ -33,9 +33,11 @@
    if path is None or not os.path.isdir(path):
    return False
    for root, dirs, files in os.walk(path):
    - for name in files:
    - if os.access(root, os.W_OK) is not True or os.access(os.path.join(root, name), os.W_OK) is not True:
    - return False
    + files = [f for f in files if not f[0] == '.']
    + dirs[:] = [d for d in dirs if not d[0] == '.']
    + for name in files:
    + if os.access(root, os.W_OK) is not True or os.access(os.path.join(root, name), os.W_OK) is not True:
    + return False
    return True
    def GetClassImporter(classpath):