Issue 1685773: tarfile file names under win32 (original) (raw)
Issue1685773
Created on 2007-03-22 07:12 by indi4source, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg31615 - (view) | Author: ralf (indi4source) | Date: 2007-03-22 07:12 |
the tarfile module uses normpath() to store the file name in the archive. Under win32 this results in pathes with backslashes and possible a leading "\". This confuses the unix tar command. I suppose the following commands instead of just normpath(): path = normpath (path) path = path.replace ("\\", "/") path = path.lstrip ("/") | ||
msg31616 - (view) | Author: Gabriel Genellina (ggenellina) | Date: 2007-03-23 10:36 |
tarfile already attempts to manage backslashes well, using os.path.normpath(path).replace(os.sep, "/") Can you provide a small script demonstrating the failure? | ||
msg31617 - (view) | Author: ralf (indi4source) | Date: 2007-03-27 08:25 |
Sorry, I was using an derived class of TarFile and didn't realize that tarfile has defined its own normpath() function. When using tarfile.normpath() in my class it is working, too. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:23 | admin | set | github: 44757 |
2007-03-22 07:12:43 | indi4source | create |