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:
parent
6f50cc3413
commit
dd89181062
1 changed files with 7 additions and 7 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue