1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-25 17:27:31 +00:00

fuse: refactor / optimize process_inner

This commit is contained in:
Thomas Waldmann 2016-09-01 05:44:38 +02:00
parent 6f50cc3413
commit dd89181062

View file

@ -182,15 +182,15 @@ def version_name(name, item):
if name:
self.contents[parent][name] = inode
def process_inner(self, name, parent):
if name in self.contents[parent]:
parent = self.contents[parent][name]
def process_inner(self, name, parent_inode):
dir = self.contents[parent_inode]
if name in dir:
inode = dir[name]
else:
inode = self._create_dir(parent)
inode = self._create_dir(parent_inode)
if name:
self.contents[parent][name] = inode
parent = inode
return parent
dir[name] = inode
return inode
def allocate_inode(self):
self._inode_count += 1