1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-20 21:27:32 +00:00

fuse: remove unnecessary normpaths

This commit is contained in:
Marian Beermann 2017-06-13 23:36:12 +02:00
parent 8e477414ee
commit ec532304d2

View file

@ -166,7 +166,7 @@ def process_archive(self, archive_name, prefix=[]):
unpacker.feed(data)
for item in unpacker:
item = Item(internal_dict=item)
path = os.fsencode(os.path.normpath(item.path))
path = os.fsencode(item.path)
is_dir = stat.S_ISDIR(item.mode)
if is_dir:
try:
@ -208,14 +208,14 @@ def make_versioned_name(name, version, add_dir=False):
if version is not None:
# regular file, with contents - maybe a hardlink master
name = make_versioned_name(name, version)
path = os.fsencode(os.path.normpath(item.path))
path = os.fsencode(item.path)
self.file_versions[path] = version
path = item.path
del item.path # safe some space
if 'source' in item and hardlinkable(item.mode):
# a hardlink, no contents, <source> is the hardlink master
source = os.fsencode(os.path.normpath(item.source))
source = os.fsencode(item.source)
if self.versions:
# adjust source name with version
version = self.file_versions[source]