Skip to content

Commit

Permalink
Fixed a paths problems with custom file assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemmstone committed Mar 21, 2024
1 parent 20ceedb commit 9ed9f9d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,13 @@ def download_app(self, platform_name):
extracting_dialog.show()
extracting_dialog.setWindowTitle("Extracting...")
with zipfile.ZipFile(os.path.join(exe_dir, 'update.zip'), 'r') as zip_ref:
zip_ref.extractall(exe_dir)
if platform_name == "Python":
zip_file_name = zip_ref.namelist()[0]
zip_ref.extractall(exe_dir, members=[member for member in zip_ref.namelist() if
member.startswith(zip_file_name) and len(member) > len(
zip_file_name) + 1])
else:
zip_ref.extractall(exe_dir)
extracting_dialog.accept()

os.remove(os.path.join(exe_dir, 'update.zip'))
Expand Down

0 comments on commit 9ed9f9d

Please sign in to comment.