Verified Commit b5649a34 authored by Jakob Moser's avatar Jakob Moser
Browse files

Skip no-ops when moving

parent e4f7172f
Loading
Loading
Loading
Loading
+4 −0
Changes for karaokatalog/instructions/MoveInstruction.py: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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")