mijorus / gearlever

Manage AppImages with ease 📦
https://mijorus.it/projects/gearlever
GNU General Public License v3.0
429 stars 15 forks source link

Add a check to avoid copying the demo.AppImage file multiple times #91

Closed TuxDeluxe closed 2 months ago

TuxDeluxe commented 2 months ago

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.

mijorus commented 2 months ago

lgtm, thank you!