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 lars.gustaebel
Recipients lars.gustaebel, srid, vstinner
Date 2010-06-14.17:42:58
SpamBayes Score 1.5453528e-05
Marked as misclassified No
Message-id <1276537381.37.0.626032333004.issue8958@psf.upfronthosting.co.za>
In-reply-to
Content
a) The point is: the operation simply wouldn't fail on a case-sensitive filesystem. There is no platform-specific or otherwise special code in TarFile.makefile(). It simply tries to extract the file and the filesystem layer says no, because it believes there is already a directory with the same name. The same thing happens on a Windows filesystem BTW. The problem boils down to this:

>>> os.mkdir("A")
>>> open("a", "w")
IOError: [Errno 21] Is a directory: 'a'

And IIUC, the Mac OS X filesystem is case-preserving(!) by default, with the possibility to create new filesystems as case-sensitive. As I said, my Mac OS X expertise is almost nonexistent, you might as well ask someone with more knowledge on Python on Mac OS X.

b) I don't know what Finder does with that archive, but I cannot think of any other way than either not to extract the file at all or to extract it under a different name or to remove the directory first and then extract the file. Could you please examine how Finder extracts this archive?

c) IMHO the IOError exception is perfectly fine, because this kind of issue is outside of tarfile's scope. We hit a filesystem limit here. Also, there is no decent way to work around this problem, and I think there is no need to either.
History
Date User Action Args
2010-06-14 17:43:01lars.gustaebelsetrecipients: + lars.gustaebel, vstinner, srid
2010-06-14 17:43:01lars.gustaebelsetmessageid: <1276537381.37.0.626032333004.issue8958@psf.upfronthosting.co.za>
2010-06-14 17:42:59lars.gustaebellinkissue8958 messages
2010-06-14 17:42:58lars.gustaebelcreate