You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ("/")
tarfile already attempts to manage backslashes well, using os.path.normpath(path).replace(os.sep, "/")
Can you provide a small script demonstrating the failure?
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.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: