From 86a870d429d34e49b1def65b1c1b46de98079dbd Mon Sep 17 00:00:00 2001 From: Jakob Moser Date: Sun, 1 Jun 2025 11:30:49 +0200 Subject: [PATCH] Avoid shutil where we can --- karaokatalog/instructions/MoveInstruction.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/karaokatalog/instructions/MoveInstruction.py b/karaokatalog/instructions/MoveInstruction.py index e1cc136..5fb04ff 100644 --- a/karaokatalog/instructions/MoveInstruction.py +++ b/karaokatalog/instructions/MoveInstruction.py @@ -1,4 +1,3 @@ -import shutil from dataclasses import dataclass from pathlib import Path @@ -19,4 +18,4 @@ class MoveInstruction(Instruction): if self.new_path.exists(): raise FileExistsError("New path already exists, not moving anything") - shutil.move(self.old_path, self.new_path) + self.old_path.rename(self.new_path)