1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-26 09:47:58 +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: if name:
self.contents[parent][name] = inode self.contents[parent][name] = inode
def process_inner(self, name, parent): def process_inner(self, name, parent_inode):
if name in self.contents[parent]: dir = self.contents[parent_inode]
parent = self.contents[parent][name] if name in dir:
inode = dir[name]
else: else:
inode = self._create_dir(parent) inode = self._create_dir(parent_inode)
if name: if name:
self.contents[parent][name] = inode dir[name] = inode
parent = inode return inode
return parent
def allocate_inode(self): def allocate_inode(self):
self._inode_count += 1 self._inode_count += 1