Skip to content

Commit 4dd17f8

Browse files
authored
This should fix weird behavior in ubuntu when not selecting file
1 parent 43c0be2 commit 4dd17f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def changeTextureFunc(self, value):
178178
if idx < len(supported_extensions)-1:
179179
exts_str += " "
180180
filePath = customtkinter.filedialog.askopenfilename(filetypes=[("Image files", ".jpeg .jpg .gif .png .webp .tiff .tif .bmp .psd .ico"), ("All image files", exts_str)])
181-
if filePath != '' and Path(filePath).exists():
181+
if filePath != '' and isinstance(filePath, str):
182182
if not canOpenImage(filePath):
183183
messagebox.showerror("Failed to open image", "Unable to open the selected image")
184184
else:

0 commit comments

Comments
 (0)