file_manager: minor type checking fixes
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
bb0266f5c4
commit
0b1fce8a6d
|
@ -615,6 +615,8 @@ class FileManager:
|
||||||
):
|
):
|
||||||
action = "modify_file"
|
action = "modify_file"
|
||||||
op_func = shutil.copy2
|
op_func = shutil.copy2
|
||||||
|
else:
|
||||||
|
raise self.server.error(f"Invalid endpoint {ep}")
|
||||||
self.sync_lock.setup(action, dest_path, move_copy=True)
|
self.sync_lock.setup(action, dest_path, move_copy=True)
|
||||||
try:
|
try:
|
||||||
full_dest = await self.event_loop.run_in_thread(
|
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):
|
def _handle_move_timeout(self, cookie: int, is_dir: bool):
|
||||||
if cookie not in self.pending_moves:
|
if cookie not in self.pending_moves:
|
||||||
return
|
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)
|
item_path = os.path.join(parent_node.get_path(), name)
|
||||||
root = parent_node.get_root()
|
root = parent_node.get_root()
|
||||||
self.clear_metadata(root, item_path, is_dir)
|
self.clear_metadata(root, item_path, is_dir)
|
||||||
|
|
Loading…
Reference in New Issue