Commit dfebaac9 by rfkelly0

remove ill-advised retry loop in OSFS.removedir.

Some ways of opening a file can cause it to infinite-loop on Windows.
parent 9599a2a7
......@@ -129,13 +129,7 @@ class OSFS(FS):
# Don't remove the root directory of this FS
if path in ("","/"):
return
try:
os.rmdir(sys_path)
except OSError, e:
if e.errno != errno.ENOTEMPTY or not force:
raise
# Someone has created files in here in the meantime, try again.
self.removedir(path,recursive=False,force=True)
os.rmdir(sys_path)
# Using os.removedirs() for this can result in dirs being
# removed outside the root of this FS, so we recurse manually.
if recursive:
......
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