[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)
Heikki Toivonen
report at bugs.python.org
Mon Jan 24 21:47:42 CET 2011
Heikki Toivonen <hjtoi-bugzilla at comcast.net> added the comment:
I also noticed this last week. However, this is not Windows specific. It happens with file systems that are not case sensitive. Besides Windows (NTFS, FAT*) the other common platform is Macintosh (HFS+ with default settings).
What happens is that we copy source into itself, then delete source.
I am not sure what the optimal solution would be but an easy one would be to first try os.rename (which works in this case), but if that fails then do the stuff that is currently shutil.move.
----------
nosy: +heikki
title: Folders get deleted when trying to change case with shutil.move (Windows) -> Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)
versions: +Python 2.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10684>
_______________________________________
More information about the Python-bugs-list
mailing list