Skip to content

Commit 02ff8bf

Browse files
committed
Program doesn't crash anymore when there's no file or folder with a file in the Input folder.
Fixed bug where the welcome screen wasn't shown the first time the program is opened.
1 parent 89cff96 commit 02ff8bf

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Python/gui.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ def init_window_theme():
3030
def init_window():
3131
sg.user_settings_filename(filename="settings.json", path=".")
3232

33-
if not sg.user_settings_get_entry("input_folder"):
34-
sg.user_settings_set_entry("input_folder", resource_path("Input"))
35-
3633
if not os.path.isfile(sg.user_settings_filename()):
3734
sg.Popup("This is a tool that allows you to convert legacy (old) mods to the latest version of CCCP. You can get more information from the GitHub repo or the Discord server by clicking the corresponding icons.", title="Welcome screen", custom_text=" OK ")
3835

36+
if not sg.user_settings_get_entry("input_folder"):
37+
sg.user_settings_set_entry("input_folder", "Input")
38+
3939
paths_column = [
4040
[sg.Frame(layout=[
4141
[

Python/update_progress.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
def increment_progress():
1111
global progress # TODO: See what happens when this line is removed.
1212
progress += 1
13-
cfg.progress_bar.UpdateBar(progress % total_progress, total_progress)
13+
if total_progress != 0:
14+
cfg.progress_bar.UpdateBar(progress % total_progress, total_progress)
1415

1516

1617
def set_max_progress(input_folder_path):

0 commit comments

Comments
 (0)