Commit 8f9153bf by rfkelly0

more accure error reporting for OSFS.open

parent c6ac0606
......@@ -157,6 +157,7 @@ class OSFS(OSFSXAttrMixin, OSFSWatchMixin, FS):
except EnvironmentError, e:
# Win32 gives EACCES when opening a directory.
if sys.platform == "win32" and e.errno in (errno.EACCES,):
if self.isdir(path):
raise ResourceInvalidError(path)
raise
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment