file_manager: minor type checking fixes

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2024-05-11 18:01:14 -04:00
parent bb0266f5c4
commit 0b1fce8a6d
1 changed files with 3 additions and 1 deletions

View File

@ -615,6 +615,8 @@ class FileManager:
):
action = "modify_file"
op_func = shutil.copy2
else:
raise self.server.error(f"Invalid endpoint {ep}")
self.sync_lock.setup(action, dest_path, move_copy=True)
try:
full_dest = await self.event_loop.run_in_thread(
@ -1961,7 +1963,7 @@ class InotifyObserver(BaseFileSystemObserver):
def _handle_move_timeout(self, cookie: int, is_dir: bool):
if cookie not in self.pending_moves:
return
parent_node, name, hdl = self.pending_moves.pop(cookie)
parent_node, name, _ = self.pending_moves.pop(cookie)
item_path = os.path.join(parent_node.get_path(), name)
root = parent_node.get_root()
self.clear_metadata(root, item_path, is_dir)