Avoid shutil where we can

This commit is contained in:
Jakob Moser 2025-06-01 11:30:49 +02:00
parent 3d9f8d46ee
commit 86a870d429
Signed by: jakob
GPG Key ID: 3EF2BA2851B3F53C

View File

@ -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)