Antoine Pitrou added the comment: Before tackling this, I'd like a precision on os.rename(src, dst) semantics. The documentation says "If dst is a directory, OSError will be raised". However, under Linux, if src is a directory and dst is an empty directory, dst is overwritten with src:
$ mkdir src dst $ touch dst/t $ ./python -c "import os; os.rename('src', 'dst')" Traceback (most recent call last): File "<string>", line 1, in <module> OSError: [Errno 39] Directory not empty $ rm dst/t $ ./python -c "import os; os.rename('src', 'dst')" $ Is this a bug, a misfeature, or just an imprecision in the documentation? __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1577> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com