Commit 0e8921dc by rfkelly0

OSX raises EPERM when calling remove() on a dir; change to ResourceInvalidError

parent 4e2303ec
...@@ -155,6 +155,10 @@ class OSFS(OSFSXAttrMixin,OSFSWatchMixin,FS): ...@@ -155,6 +155,10 @@ class OSFS(OSFSXAttrMixin,OSFSWatchMixin,FS):
# sometimes windows says this for attempts to remove a dir # sometimes windows says this for attempts to remove a dir
if os.path.isdir(sys_path): if os.path.isdir(sys_path):
raise ResourceInvalidError(path) raise ResourceInvalidError(path)
if e.errno == errno.EPERM and sys.platform == "darwin":
# sometimes OSX says this for attempts to remove a dir
if os.path.isdir(sys_path):
raise ResourceInvalidError(path)
raise raise
@convert_os_errors @convert_os_errors
......
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