This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nadeem.vawda
Recipients brian.curtin, heikki, nadeem.vawda, nooB, orsenthil, ronaldoussoren, tarek, tim.golden
Date 2011-01-25.10:21:44
SpamBayes Score 2.0128343e-13
Marked as misclassified No
Message-id <1295950906.94.0.799980244718.issue10684@psf.upfronthosting.co.za>
In-reply-to
Content
> 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 doesn't really make a difference. You could write a small function that creates a dummy file and then tries to access it via a case variant of its name, but that seems unnecessary.

> You can't solve this by trying to do different things on different
> operating systems. This bug depends on file system properties, not OS.
It's worth pointing out that it depends on both the FS *and* OS. For example, an NTFS filesystem is case-insensitive under Windows, but case-sensitive under Linux. This has caused me headaches in the past.

> I still think the best avenue would be to first try straight os.rename,
> and if that fails (maybe only if target exists), the logic
> that is currently in shutil.move.
I agree. If os.rename() succeeds, there is no need to copy the file and then delete the original. If it fails because the two paths are on different devices, the existing code can safely be used without any further checks. I'm not sure if there are any other failure cases that would need to be handled, though.
History
Date User Action Args
2011-01-25 10:21:47nadeem.vawdasetrecipients: + nadeem.vawda, ronaldoussoren, orsenthil, tim.golden, heikki, tarek, brian.curtin, nooB
2011-01-25 10:21:46nadeem.vawdasetmessageid: <1295950906.94.0.799980244718.issue10684@psf.upfronthosting.co.za>
2011-01-25 10:21:44nadeem.vawdalinkissue10684 messages
2011-01-25 10:21:44nadeem.vawdacreate