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:
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue