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.
Created on 2010年10月23日 19:06 by loewis, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| tarfile.diff | loewis, 2010年10月23日 19:06 | |||
| tarfile-extract-directory-test.diff | lars.gustaebel, 2010年10月24日 12:32 | |||
| tarfile2.diff | loewis, 2010年10月24日 19:10 | |||
| Messages (5) | |||
|---|---|---|---|
| msg119467 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2010年10月23日 19:06 | |
When extracting, the time stamps of directories are modified twice: once when creating the directories, and then once in reverse order when done. The first utimes call is redundant; it also causes issues with a buggy NFS server, see http://www.python.org/dev/buildbot/3.1/builders/AMD64%20debian%20parallel%203.1/builds/147/steps/test/logs/stdio (specifically, touching a file twice with the same second-resolution time stamp will increase the microsecond counter). The attached patch works around the issue; regardless of the NFS bug, I think that the redundant call should be eliminated. |
|||
| msg119510 - (view) | Author: Lars Gustäbel (lars.gustaebel) * (Python committer) | Date: 2010年10月24日 12:32 | |
The patch goes a bit too far. Though it solves this particular problem with the way TarFile.extractall() works, it breaks TarFile.extract(). Running the testsuite does not expose this, simply because there's no testcase :-( Please see the attached testcase I just wrote which illustrates the problem. |
|||
| msg119524 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2010年10月24日 19:10 | |
I see. Here is an updated version that makes the touch operations optional. |
|||
| msg119545 - (view) | Author: Lars Gustäbel (lars.gustaebel) * (Python committer) | Date: 2010年10月25日 11:05 | |
I'm not entirely happy with the name of the "touch" argument. Apart from it being nice and short, I think it's a little too unix-y and might be misleading because it is not only about setting the modification time as the name implies, but also owner and mode. My proposal would be "restore_attrs" or "set_attrs" which isn't half as nice as "touch", but sums up better what's actually done. I leave this up to you. I think the testcase wouldn't work on Windows the way it is now, would it? Apart from these minor issues the patch gets my blessing, go ahead ;-) |
|||
| msg120182 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2010年11月01日 21:39 | |
This is now committed as r86102. I opted to call the parameter set_attrs. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:07 | admin | set | github: 54393 |
| 2010年11月01日 21:39:48 | loewis | set | status: open -> closed resolution: accepted |
| 2010年11月01日 21:39:39 | loewis | set | messages: + msg120182 |
| 2010年11月01日 21:01:35 | vstinner | set | nosy:
+ vstinner |
| 2010年10月29日 19:34:16 | georg.brandl | link | issue10230 superseder |
| 2010年10月25日 17:37:05 | eric.araujo | set | nosy:
+ eric.araujo versions: + Python 3.1, Python 2.7, Python 3.2 |
| 2010年10月25日 11:05:36 | lars.gustaebel | set | messages: + msg119545 |
| 2010年10月24日 19:10:32 | loewis | set | files:
+ tarfile2.diff nosy: - ghaering messages: + msg119524 assignee: ghaering -> lars.gustaebel |
| 2010年10月24日 12:32:03 | lars.gustaebel | set | files:
+ tarfile-extract-directory-test.diff nosy: + lars.gustaebel messages: + msg119510 |
| 2010年10月23日 19:06:31 | loewis | create | |