util/misc.py
changeset 3475 ee665dca07fa
parent 2456 7373e3048167
child 3479 74cfeff6a011
--- a/util/misc.py	Fri May 06 11:04:17 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