[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 26da299ca88e by Ronald Oussoren in branch '3.1': Fix for issue 10684: Folders get deleted when trying to change case with shutil.move (case insensitive file systems only) http://hg.python.org/cpython/rev/26da299ca88e New changeset

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I've committed the fix in 2.7, 3.1, 3.2 and 3.3 -- assignee: - ronaldoussoren resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: test_move_dir_caseinsensitive is failing on some of the XP buildbots: http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/4514 http://www.python.org/dev/buildbot/all/builders/x86%20XP-5%203.x/builds/2696

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: That's rather annoying. I'm reopening the issue because of this. I'm looking into the issue and will revert when I cannot find a solution soon. -- resolution: fixed - accepted status: closed - open

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: This seems to be a bug in ntpath.samefile, in particular in this code: # determine if two files are in fact the same file try: # GetFinalPathNameByHandle is available starting with Windows 6.0. # Windows XP and non-Windows OS'es

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I'm not sure what the right course of action is, revert my patch try to get ntpath.samefile fixed and then reapply my patch or something else? ntpath.samefile is definitely broken on XP: * Create a file a.txt * Start python3.2

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: On XP, os.path.samefile is really os.path.abspath(x) == os.path.abspath(y), which does not work correctly with different cases. We could add a .lower() to line 657 of Lib/ntpath.py so the abspath is always returned in lower, so the XP version

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: The attached patch seems to fix ntpath.samefile (at least for the shutils tests, I haven't run a full testsuite and cannot build python on a windows machine anyway) -- Added file: http://bugs.python.org/file21908/npath-fix.txt

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: I don't have time to test it at the moment, but it seems fine to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10684 ___

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I'm currrently running 'python -mtest.regrtest -uall' on an XP machine where I've applied my test to a binary install of 3.2. I'll apply my patch if that testrun indicates that I don't introduce other problems, and I'll revert my

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 011e4bb8b933 by Ronald Oussoren in branch '3.2': ntpath.samefile fails to detect that A.TXT and a.txt refer to the same file on Windows XP. http://hg.python.org/cpython/rev/011e4bb8b933 --

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I've committed my fix for ntpath.samefile for 3.3 and 3.2. I've also filed a new issue because ntpath.samefile has no unittests. -- ___ Python tracker rep...@bugs.python.org

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren
Changes by Ronald Oussoren ronaldousso...@mac.com: -- resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10684 ___

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-03-16 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Patch fixes the issue and tests run ok on 3.3 Win7; just building a 2.7 branch to test -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10684

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-03-15 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Could someone with access to a windows box test the patch there? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10684 ___

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-03-15 Thread Santoso Wijaya
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10684 ___ ___

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-03-14 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: The fallback to copy+remove happens because shutil.move first checks if the destination exists and is a directory, if so it moves the source into the destination, that is, given: os.mkdir('foo') os.mkdir('bar') Then

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-03-14 Thread Ronald Oussoren
Changes by Ronald Oussoren ronaldousso...@mac.com: -- keywords: +needs review stage: needs patch - patch review versions: +Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10684

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-01-26 Thread nooB
nooB nsharish@gmail.com added the comment: Few points that could be useful, 1) I added print statements in `shutil.move` and found that the `real_dst` was wrong for the case coz os.path.isdir returns true. import os os.mkdir('test') os.path.isdir('TEst') True In shutil.move, when we

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-01-25 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: BTW,what is the best way to check for case insensitive file-system? The test here merely checks if sys.platform returns mac, darwin or win32. I would suggest not checking at all. If the system is case-sensitive, the test will pass, so it

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-01-24 Thread Heikki Toivonen
Heikki Toivonen hjtoi-bugzi...@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

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-01-24 Thread Heikki Toivonen
Changes by Heikki Toivonen hjtoi-bugzi...@comcast.net: -- assignee: - ronaldoussoren components: +Macintosh nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10684 ___

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-01-24 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- assignee: ronaldoussoren - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10684 ___ ___

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-01-24 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Here is a patch (against release27-maint) for to fix this issue. BTW,what is the best way to check for case insensitive file-system? The test here merely checks if sys.platform returns mac, darwin or win32. -- keywords: +patch

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-01-24 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: I would also add 'cygwin' to the list. I am not sure about the behavior of OpenVMS or other less prevalent file systems. -- ___ Python tracker rep...@bugs.python.org

[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-01-24 Thread Heikki Toivonen
Heikki Toivonen hjtoi-bugzi...@comcast.net added the comment: You can't solve this by trying to do different things on different operating systems. This bug depends on file system properties, not OS. Also I don't think you can just lower case the path and do a comparison, because there are