File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
invokeai/app/services/image_files Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 5
5
6
6
from PIL import Image , PngImagePlugin
7
7
from PIL .Image import Image as PILImageType
8
- from send2trash import send2trash
9
8
10
9
from invokeai .app .services .image_files .image_files_base import ImageFileStorageBase
11
10
from invokeai .app .services .image_files .image_files_common import (
@@ -103,15 +102,15 @@ def delete(self, image_name: str) -> None:
103
102
image_path = self .get_path (image_name )
104
103
105
104
if image_path .exists ():
106
- send2trash ( image_path )
105
+ image_path . unlink ( )
107
106
if image_path in self .__cache :
108
107
del self .__cache [image_path ]
109
108
110
109
thumbnail_name = get_thumbnail_name (image_name )
111
110
thumbnail_path = self .get_path (thumbnail_name , True )
112
111
113
112
if thumbnail_path .exists ():
114
- send2trash ( thumbnail_path )
113
+ thumbnail_path . unlink ( )
115
114
if thumbnail_path in self .__cache :
116
115
del self .__cache [thumbnail_path ]
117
116
except Exception as e :
You can’t perform that action at this time.
0 commit comments