Add working removal
This commit is contained in:
parent
da023a5ae2
commit
424942429d
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user