Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash when calculating Asar file content offsets #711

Merged
merged 1 commit into from
Sep 23, 2021

Conversation

acarasimon96
Copy link
Contributor

@acarasimon96 acarasimon96 commented Sep 23, 2021

Fixes #704, #637, #646

Some Electron apps such as Mattermost Desktop 5.0.0 contain a directory named "offset" in their app.asar files, which is treated in code as a dict of dicts representing files and subdirectories. Hardcode Tray expects a string for actual offset values before recalculating them. This fix adds a check to make sure that it only performs the said action on offset numbers.

However, another bug came up as I completed this. For some reason, Hardcode Tray could no longer find unread and mentioned tray icons for Mattermost Desktop 5.0.0, leaving them intact as a result. This PR is complete once I have a fix for that side effect pushed into this PR and no further side effects appear.

Edit: The side effect was rather caused by typos in the proposed changes to mattermost.electron.json. Details are found in my comment on the mentioned issue.

Some Electron apps, such as Mattermost Desktop 5.0.0 (bilelmoussaoui#704), contain a
directory named "offset" in their app.asar files, which is treated
in code as a dict of dicts representing files and subdirectories.
Hardcode Tray expects a string for actual offset values before
recalculating them. This fix adds a check to make sure that it only
performs the said action on offset numbers.
@acarasimon96 acarasimon96 marked this pull request as ready for review September 23, 2021 02:39
@varlesh varlesh merged commit e1b2f81 into bilelmoussaoui:master Sep 23, 2021
This was referenced Sep 23, 2021
@acarasimon96 acarasimon96 deleted the asar-offset-dir-fix branch September 23, 2021 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mattermost
2 participants