Create parent directories if necessary

This commit is contained in:
Jakob Moser 2025-06-01 13:21:41 +02:00
parent c47c481731
commit e17d4054d5
Signed by: jakob
GPG Key ID: 3EF2BA2851B3F53C

View File

@ -18,4 +18,5 @@ class MoveInstruction(Instruction):
if self.new_path.exists():
raise FileExistsError("New path already exists, not moving anything")
self.new_path.parent.mkdir(exist_ok=True, parents=True)
self.old_path.rename(self.new_path)