The welcome screen checks if the path to the demo.AppImage file in the user's cache directory exists but not if the demo file itself exists.
To avoid copying the demo file multiple times, I rolled both in to one check (if the file exists then the path to it exists so we can skip both making the directories and copying the file). As well as using os.makedirs(... exist_ok=True) to skip making the directories if it exists inside this check without the need to use an additional if statement.
I also added in os.path.join() to my demo_app_dest variable so I changed those around this part for consistency.
The welcome screen checks if the path to the demo.AppImage file in the user's cache directory exists but not if the demo file itself exists.
To avoid copying the demo file multiple times, I rolled both in to one check (if the file exists then the path to it exists so we can skip both making the directories and copying the file). As well as using
os.makedirs(... exist_ok=True)
to skip making the directories if it exists inside this check without the need to use an additional if statement.I also added in
os.path.join()
to my demo_app_dest variable so I changed those around this part for consistency.