Bugs item #1685773, was opened at 2007-03-22 08:12
Message generated for change (Comment added) made by indi4source
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1685773&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: ralf (indi4source)
Assigned to: Lars Gustäbel (gustaebel)
Summary: tarfile file names under win32

Initial Comment:
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 ("/")

----------------------------------------------------------------------

>Comment By: ralf (indi4source)
Date: 2007-03-27 10:25

Message:
Logged In: YES 
user_id=1182990
Originator: YES

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.

----------------------------------------------------------------------

Comment By: Gabriel Genellina (gagenellina)
Date: 2007-03-23 11:36

Message:
Logged In: YES 
user_id=479790
Originator: NO

tarfile already attempts to manage backslashes well, using
os.path.normpath(path).replace(os.sep, "/")
Can you provide a small script demonstrating the failure?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1685773&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to