Martin v. Löwis added the comment: I'm skeptical. If you consider junction points similar to symlinks on POSIX, then it would be semantically correct to leave the junction point in place, independent of whether their target directory is empty or not - on Unix, rmdir fails if the target is a symlink.
Given the documentation, I think the removedirs function does exactly do what the documentation specifies as the algorithm (i.e. recursively rmdir until an error occurs). The promise ("remove all empty intermediate directories") is not held: on POSIX, it would stop at a symlink even if that symlink was the only entry in the directory, and on Windows, the junction point is removed even if the target directory is not empty. I would rather fix this in the documentation than change something in the implementation. If the behavior is to be changed, the documentation needs to be updated. The patch does introduce a significant behavior change: if the last directory is not empty, it now silently returns; previously, it would raise OSError. _____________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1439312> _____________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com