Skip to content

Commit 993e3ba

Browse files
committed
Small update to rename_files.py
1 parent d9ad8da commit 993e3ba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rename_files.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,11 @@ def start_renaming():
213213
root.title("File Renaming Tool")
214214

215215
# Set the taskbar and app window icon to the provided icon
216-
root.iconbitmap("file_renamer_icon.ico")
216+
if hasattr(sys, '_MEIPASS'):
217+
icon_path = os.path.join(sys._MEIPASS, "file_renamer_icon.ico")
218+
else:
219+
icon_path = "file_renamer_icon.ico"
220+
root.iconbitmap(icon_path)
217221

218222
# Calculate 3/4 screen size
219223
screen_width = root.winfo_screenwidth()

0 commit comments

Comments
 (0)