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