From 38b3d3d986fbf685734d48218803e785ebdbc889 Mon Sep 17 00:00:00 2001 From: peery Date: Sat, 5 Jun 2021 16:10:48 +0200 Subject: [PATCH] Fixed Issue with deletion Fixed an issue with the delete action on an image moving to a trash folder across file systems by using shutil instead. --- ArtNet/artnet_manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ArtNet/artnet_manager.py b/ArtNet/artnet_manager.py index 6bd67f3..08523cc 100644 --- a/ArtNet/artnet_manager.py +++ b/ArtNet/artnet_manager.py @@ -1,3 +1,4 @@ +import shutil import sys import os from hashlib import md5 @@ -206,8 +207,8 @@ class ArtNetManager: if not os.path.exists(t_path): print(f"{t_path} did not exist and will be created!") os.makedirs("."+os.path.sep+t_path) - os.rename(full_art_path, trash_dst) print(f"Moving image {full_art_path} to {trash_dst}") + shutil.move(full_art_path, trash_dst) self.update_all_images_list() while self.curr_image_index >= len(self.all_images):