mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-22 14:11:27 +00:00
fuse: remove unnecessary normpaths
This commit is contained in:
parent
8e477414ee
commit
ec532304d2
1 changed files with 3 additions and 3 deletions
|
@ -166,7 +166,7 @@ def process_archive(self, archive_name, prefix=[]):
|
||||||
unpacker.feed(data)
|
unpacker.feed(data)
|
||||||
for item in unpacker:
|
for item in unpacker:
|
||||||
item = Item(internal_dict=item)
|
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)
|
is_dir = stat.S_ISDIR(item.mode)
|
||||||
if is_dir:
|
if is_dir:
|
||||||
try:
|
try:
|
||||||
|
@ -208,14 +208,14 @@ def make_versioned_name(name, version, add_dir=False):
|
||||||
if version is not None:
|
if version is not None:
|
||||||
# regular file, with contents - maybe a hardlink master
|
# regular file, with contents - maybe a hardlink master
|
||||||
name = make_versioned_name(name, version)
|
name = make_versioned_name(name, version)
|
||||||
path = os.fsencode(os.path.normpath(item.path))
|
path = os.fsencode(item.path)
|
||||||
self.file_versions[path] = version
|
self.file_versions[path] = version
|
||||||
|
|
||||||
path = item.path
|
path = item.path
|
||||||
del item.path # safe some space
|
del item.path # safe some space
|
||||||
if 'source' in item and hardlinkable(item.mode):
|
if 'source' in item and hardlinkable(item.mode):
|
||||||
# a hardlink, no contents, <source> is the hardlink master
|
# 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:
|
if self.versions:
|
||||||
# adjust source name with version
|
# adjust source name with version
|
||||||
version = self.file_versions[source]
|
version = self.file_versions[source]
|
||||||
|
|
Loading…
Reference in a new issue