diff --git a/waflib/Context.py b/waflib/Context.py index e879087b..d057e256 100644 --- a/waflib/Context.py +++ b/waflib/Context.py @@ -307,6 +307,10 @@ class Context(ctx): elif not node: if not mandatory: continue + try: + os.listdir(d) + except OSError: + raise Errors.WafError('Cannot read the folder %r' % d) raise Errors.WafError('No wscript file in directory %s' % d) def exec_command(self, cmd, **kw):