IDE: better permission checking when opening a project.
--- a/util/misc.py Mon May 30 12:44:04 2022 +0200
+++ b/util/misc.py Mon May 23 16:27:56 2022 +0200
@@ -42,8 +42,10 @@
for root, dirs, files in os.walk(path):
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:
+ if os.access(root, os.W_OK) is not True:
+ return False
+ for name in dirs + files:
+ if os.access(os.path.join(root, name), os.W_OK) is not True:
return False
return True