Lars Gustäbel
e5f9e588c6
Issue #1735 : TarFile.extractall() now correctly sets directory
...
permissions and times.
(backport from r59712)
2008-01-04 14:44:23 +00:00
Lars Gustäbel
7cc9c8bbe1
Issue #1531 : Read fileobj from the current offset, do not seek to
...
the start.
(backport from r59260)
2007-12-01 21:06:06 +00:00
Lars Gustäbel
a9bad98e3d
TarFile.__init__() no longer fails if no name argument is passed and
...
the fileobj argument has no usable name attribute (e.g. StringIO).
(backported from r57616)
2007-08-28 12:33:15 +00:00
Lars Gustäbel
9319e43c67
Patch #1695229 : Fix a regression with tarfile.open() and a missing name
...
argument.
2007-04-20 20:10:59 +00:00
Lars Gustäbel
d220144a84
Fix directory names to have only one trailing slash.
...
A regression from rev. 52525.
2007-04-20 14:49:02 +00:00
Lars Gustäbel
f9a2c63c79
Patch #1504073 : Fix tarfile.open() for mode "r" with a fileobj argument.
...
Backport from rev. 53161.
2006-12-27 10:36:58 +00:00
Lars Gustäbel
12e087a1b1
Patch #1262036 : Prevent TarFiles from being added to themselves under
...
certain conditions.
(backport from rev. 53155)
Moved message from my previous change to the right place in
Misc/NEWS.
2006-12-23 18:13:57 +00:00
Lars Gustäbel
aedb92e59c
Patch #1230446 : tarfile.py: fix ExFileObject so that read() and tell()
...
work correctly together with readline().
(backport from rev. 53153)
2006-12-23 16:51:47 +00:00
Georg Brandl
25f58f6b5a
Patch #1610437 : fix a tarfile bug with long filename headers.
...
(backport from rev. 52938)
2006-12-06 22:21:23 +00:00
Georg Brandl
ee23f4bba7
Patch [ 1583506 ] tarfile.py: 100-char filenames are truncated
...
(backport from rev. 52431)
2006-10-24 16:54:23 +00:00
Neal Norwitz
7443b80549
Backport 51432:
...
Fix bug #1543303 , tarfile adds padding that breaks gunzip.
Patch # 1543897. (remove the padding)
2006-08-21 18:43:51 +00:00
Tim Peters
4e30617bad
The cheery optimism of old age.
2006-05-27 14:13:13 +00:00
Tim Peters
de41dc865a
More random thrashing trying to understand spurious
...
Windows failures. Who's keeping a bz2 file open?
2006-05-27 12:36:53 +00:00
Tim Peters
02494764cb
Explicitly close files. I'm trying to stop the frequent spurious test_tarfile
...
failures on Windows buildbots, but it's hard to know how since the regrtest
failure output is useless here, and it never fails when a buildbot slave runs
test_tarfile the second time in verbose mode.
2006-05-26 14:02:05 +00:00
Tim Peters
b1f3251ceb
Use open() to open files (was using file()).
2006-05-26 13:39:17 +00:00
Tim Peters
4ccc0b7dfe
test_directory(): Remove the leftover temp directory that's making
...
the Windows buildbots fail test_tarfile.
2006-05-15 21:32:25 +00:00
Tim Peters
12087bae18
ReadDetectFileobjTest: repair Windows disasters by opening
...
the file object in binary mode.
The Windows buildbot slaves shouldn't swap themselves to death
anymore. However, test_tarfile may still fail because of a
temp directory left behind from a previous failing run.
Windows buildbot owners may need to remove that directory
by hand.
2006-05-15 20:44:10 +00:00
Georg Brandl
49c8f4cf36
[ 1488881 ] tarfile.py: support for file-objects and bz2 (cp. #1488634 )
2006-05-15 19:30:35 +00:00
Georg Brandl
38c6a22f38
Patch #1484695 : Update the tarfile module to version 0.8. This fixes
...
a couple of issues, notably handling of long file names using the
GNU LONGNAME extension.
2006-05-10 16:26:03 +00:00
Neal Norwitz
f339654280
Patch #1338314 , Bug #1336623 : fix tarfile so it can extract
...
REGTYPE directories from tarfiles written by old programs.
Will backport.
2005-10-28 05:52:22 +00:00
Neal Norwitz
b0e32e2b71
Fix SF bug # 1330039, patch # 1331635 from Lars Gustaebel (tarfile maintainer)
...
Problem: if two files are assigned the same inode
number by the filesystem, the second one will be added
as a hardlink to the first, which means that the
content will be lost.
The patched code checks if the file's st_nlink is
greater 1. So only for files that actually have several
links pointing to them hardlinks will be created, which
is what GNU tar does.
Will backport.
2005-10-20 04:50:13 +00:00
Martin v. Löwis
5dbdc59577
Patch #1168594 : set sizes of non-regular files to zero. Fixes #1167128 .
...
Will backport to 2.4.
2005-08-27 10:07:56 +00:00
Martin v. Löwis
78be7df9e4
Patch #918101 : Add tarfile open mode r|* for auto-detection of the
...
stream compression; add, for symmetry reasons, r:* as a synonym of r.
2005-03-05 12:47:42 +00:00
Martin v. Löwis
df24153f65
Patch #1107973 : tarfile.ExFileObject iterators.
2005-03-03 08:17:42 +00:00
Tim Peters
8ceefc5a56
Whitespace normalization.
2004-10-25 03:19:41 +00:00
Andrew M. Kuchling
d4f2552ef8
Add test case for bug #1017553
2004-10-20 11:47:01 +00:00
Martin v. Löwis
c234a52458
Flush bz2 data even if nothing had been written so far. Fixes #1013882 .
...
Will backport to 2.3.
2004-08-22 21:28:33 +00:00
Neal Norwitz
a4f651a2ae
SF #857297 and 916874, improve handling of hard links when extracting
2004-07-20 22:07:44 +00:00
Neal Norwitz
0662f8a5ea
SF #846659 , fix bufsize violation and GNU longname/longlink extensions
2004-07-20 21:54:18 +00:00
Brett Cannon
43e559a155
When calling tarname with an argument (and thus not use testtar.tar) return a
...
path for the file in the temp directory for the platform.
2003-06-12 19:16:58 +00:00
Brett Cannon
455ea53d0e
Make creation of temporary file and directory more portable. Also made cleanup
...
code use proper functions to get paths.
Changed the name of tar file that is searched for to be absolute (i.e., not use
os.extsep) since filename is locked in based on name of file in CVS
(testtar.tar).
Closes bug #731403 .
2003-06-12 08:01:06 +00:00
Martin v. Löwis
a94568a753
Patch #734231 : Update RiscOS support. In particular, correct
...
riscospath.extsep, and use os.extsep throughout.
2003-05-10 07:36:56 +00:00
Walter Dörwald
21d3a32b99
Combine the functionality of test_support.run_unittest()
...
and test_support.run_classtests() into run_unittest()
and use it wherever possible.
Also don't use "from test.test_support import ...", but
"from test import test_support" in a few spots.
From SF patch #662807 .
2003-05-01 17:45:56 +00:00
Neal Norwitz
ae323198e5
Get test working if gzip support is not available
2003-04-14 01:18:32 +00:00
Jack Jansen
149a8993b0
The filename fix of the previous checkin was complete bogus, the problem is elsewhere. Retracting.
2003-03-07 13:27:53 +00:00
Jack Jansen
c7fcc2d772
Two fixes to make this test pass on MacOS9:
...
- the test was sloppy about filenames: "0-REGTYPE-TEXT" was used where
the archive held "/0-REGTYPE-TEXT".
- tarfile extracts all files in binary mode, but the test expected to be able to
read and compare text files in text mode. Use universal text mode.
2003-03-07 12:50:45 +00:00
Tim Peters
8266af4f06
Removed debugging print in test_tarfile.
...
In the Windows installer, continued the endless battle to copy over files
with new one-shot extensions.
2003-02-19 02:41:44 +00:00
Tim Peters
f2715e0764
Whitespace normalization.
2003-02-19 02:35:07 +00:00
Neal Norwitz
996acf122d
Actually run these tests from regrtest.py.
...
There was no test_main() and the main body was protected
by if __name__ == '__main__' so the test didn't happen
on import either.
2003-02-17 14:51:41 +00:00
Neal Norwitz
b9ef4aea5e
SF #651082 , tarfile module implementation from Lars Gustäbel
2003-01-05 23:19:43 +00:00