diff --git a/moonraker/components/file_manager/file_manager.py b/moonraker/components/file_manager/file_manager.py index 45d69aa..b8ad71d 100644 --- a/moonraker/components/file_manager/file_manager.py +++ b/moonraker/components/file_manager/file_manager.py @@ -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)