From f78b6717acaa7f8d898e1fd624a601a5306eb2d0 Mon Sep 17 00:00:00 2001 From: Richard Young Date: Tue, 16 Nov 2021 18:49:07 -0500 Subject: [PATCH] stuff --- libarchive/__init__.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libarchive/__init__.py b/libarchive/__init__.py index 4be68a1..a6053f5 100644 --- a/libarchive/__init__.py +++ b/libarchive/__init__.py @@ -297,7 +297,9 @@ class EntryWriteStream(object): class Entry(object): '''An entry within an archive. Represents the header data and it's location within the archive.''' - def __init__(self, pathname=None, size=None, mtime=None, mode=None, hpos=None, encoding=ENCODING, symlink=None): + def __init__(self, pathname=None, size=None, mtime=None, mode=None, hpos=None, encoding=ENCODING): + + #, symlink=None self.pathname = pathname self.size = size self.mtime = mtime @@ -305,8 +307,10 @@ class Entry(object): self.hpos = hpos self.encoding = encoding - if self.issym() and symlink: - self.symlink = symlink + self.symlink = "" + + #if self.issym() and symlink: + # self.symlink = symlink #else: # self.symlink = None @@ -393,6 +397,8 @@ class Entry(object): _libarchive.archive_entry_set_symlink(e, self.symlink) call_and_check(_libarchive.archive_write_header, archive._a, archive._a, e) + + #todo #self.hpos = archive.header_position finally: _libarchive.archive_entry_free(e)