[issue5500] tarfile: path problem in arcname under windows
Lars Gustäbel l...@gustaebel.de added the comment: I suppose this issue is related to issue4750 which I have just closed. If not, please reopen this issue. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5500] tarfile: path problem in arcname under windows
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The archive is created, and the path in the archive is 'C:\\testtarfile\\testtarfile.py', not 'test/testtarfile.py' as I would expect. I don't see the path you mention. Which archive manager do you use? I tried with 7-zip, and it shows that I can browse to a path named C:\testtarfile\tarfiletst.tar.gz\C:\testtarfile\tarfiletst.tar\test\ which contains testtarfile.py. C:\testtarfile\tarfiletst.tar.gz contains C:\testtarfile\tarfiletst.tar, which itselfs contains test\testtarfile.py IOW, 7-zip simply fails to understand the .tar.gz format as a single compressed archive. To extract it properly, it's easy enough to browse the content until you open the content of the .tar. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5500] tarfile: path problem in arcname under windows
Elijah Merkin e...@transas.com added the comment: Tested again under Python 2.6.1 on Windows XP (added Python 2.6 to versions). An archive I attached to the issue contains a .py file that reproduces the bug and an archive created by it. In my case I just put the .py file to C:\testtarfile\ directory and run it. When I open the file by any archive manager I have in Windows, I see. When I view the file contents in a hex viewer, I also see 'C:\\testtarfile\...', so the problem really exists. However, when uncompressing the archive on Linux (tar -xzf ...) I get 'test/testtarfile.py' as initially expected. The archive is created, and the path in the archive is 'C:\\testtarfile\\testtarfile.py', not 'test/testtarfile.py' as I would expect. -- versions: +Python 2.6 Added file: http://bugs.python.org/file13375/reproduce_issue5500.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5500] tarfile: path problem in arcname under windows
Elijah Merkin e...@transas.com added the comment: Sorry for not explaining properly, I was distracted. 1. The absolute path really exists in the .tar.gz file when I view it in a hex editor. 2. Windows archive managers I tried see that absolute path. 3. Linux tar utility, however, somehow manages to extract the file correctly to the original relative path. That's very strange... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5500] tarfile: path problem in arcname under windows
Lars Gustäbel l...@gustaebel.de added the comment: At the moment, I am unable to reproduce the problem you describe. I tried several combinations of what I think you could have meant, but everything seems to work okay here. Could you please provide some stand-alone testcase or code to illustrate that issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5500] tarfile: path problem in arcname under windows
New submission from Elijah Merkin e...@transas.com: Tested on Python 2.5.4. 1. Use tarfile.open(fname, w|gz) to create an archive. 2. Add a file using TarFile.add(name, arcname=None, recursive=True, exclude=None) by specifying 2 params: absolute path to a source file as 'name' and something containing one or more directories, e.g. 'test/myfile.txt' as 'arcname'. 3. Close the archive. On Linux file is added as 'test/myfile.txt'. On Windows the full path specified as 'name' is used (e.g. 'D:\\MyDir\\myfile.txt'). When I use 'w|bz2' everything works correctly. Probably this bug is somewhat similar to a bug #4750, though it happens under Windows and doesn't happen under Linux. -- components: Library (Lib), Windows messages: 83680 nosy: ellioh severity: normal status: open title: tarfile: path problem in arcname under windows type: behavior versions: Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com