# HG changeset patch # User Andrey Skvortsov # Date 1501245251 -10800 # Node ID 704c7036db85660a48f0f9752f73bef7500c7fc8 # Parent 703ddaf48b00df76496c52f60cf2021763d94996 skip hidden files and directories on permission check To fix problems with git, because .git subdirectory contains read-only repository objects. diff -r 703ddaf48b00 -r 704c7036db85 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):