From b5649a349babb0fa3fc9881acff1e62249e4539d Mon Sep 17 00:00:00 2001 From: Jakob Moser Date: Sun, 1 Jun 2025 14:45:00 +0200 Subject: [PATCH] Skip no-ops when moving --- karaokatalog/instructions/MoveInstruction.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/karaokatalog/instructions/MoveInstruction.py b/karaokatalog/instructions/MoveInstruction.py index 83a74c3..63271bb 100644 --- a/karaokatalog/instructions/MoveInstruction.py +++ b/karaokatalog/instructions/MoveInstruction.py @@ -15,6 +15,10 @@ class MoveInstruction(Instruction): new_path: Path def __call__(self) -> None: + if self.old_path == self.new_path: + # No-op + return + if self.new_path.exists(): raise FileExistsError("New path already exists, not moving anything")