Commit 776c7082 by rfkelly0

more win32 OSFS compatability

parent 484c451e
......@@ -89,7 +89,14 @@ class OSFS(FS):
@convert_os_errors
def remove(self, path):
sys_path = self.getsyspath(path)
os.remove(sys_path)
try:
os.remove(sys_path)
except OSError, e:
if e.errno == 13 and sys.platform == "win32":
# sometimes windows says this for attempts to remove a dir
if os.path.isdir(sys_path):
raise ResourceInvalidError(path)
raise
@convert_os_errors
def removedir(self, path, recursive=False,force=False):
......
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