Add working removal
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import shutil
|
||||||
|
|
||||||
from karaokatalog.deduplicate.instructions.Instruction import Instruction
|
from karaokatalog.deduplicate.instructions.Instruction import Instruction
|
||||||
|
|
||||||
@@ -16,4 +17,4 @@ class DeleteInstruction(Instruction):
|
|||||||
try:
|
try:
|
||||||
self.path_to_delete.unlink()
|
self.path_to_delete.unlink()
|
||||||
except IsADirectoryError:
|
except IsADirectoryError:
|
||||||
self.path_to_delete.rmdir()
|
shutil.rmtree(self.path_to_delete)
|
||||||
|
|||||||
Reference in New Issue
Block a user