diff --git a/cmake/EnvConfig/Variable.py b/cmake/EnvConfig/Variable.py index e1019b2c38bc07aa2e64768d5cca5987959d69e0..ed32a8981a5f3740962f9e4d6d10240966cebc76 100644 --- a/cmake/EnvConfig/Variable.py +++ b/cmake/EnvConfig/Variable.py @@ -126,8 +126,9 @@ class EmptyDirsRemover(ListProcessor): ''' def process(self, variable, value): from os.path import isdir - from os import listdir - return [s for s in value if s.endswith('.zip') or (isdir(s) and listdir(s))] + from os import listdir, access + return [s for s in value if s.endswith('.zip') or + (isdir(s) and access(s, os.R_OK) and listdir(s))] class UsePythonZip(ListProcessor): '''