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 panic when resources root path is not the working directory #112

Merged
merged 1 commit into from
Dec 9, 2019

Conversation

ksubileau
Copy link
Contributor

@ksubileau ksubileau commented Dec 9, 2019

On Windows, Walk look for the icon in its resources root path, but systray write it to the current working directory.
The current working directory is the default root path, but it may be changed by external code (walk.Resources.SetRootDirPath()).
In this case, systray panic because walk can't find the temporary icon.

This PR fix this issue by writing the icon to the correct resources root path.

My personal use case is to set the resources root path to os.TempDir() to avoid a panic in case of the current working directory is not writable.

@oxtoacart
Copy link
Contributor

Thanks @ksubileau!

@oxtoacart oxtoacart merged commit 92663d2 into getlantern:master Dec 9, 2019
@ksubileau ksubileau deleted the patch-1 branch December 10, 2019 08:39
ropog3ovomou pushed a commit to ropog3ovomou/systray that referenced this pull request Jul 13, 2022
Fix panic when resources root path is not the working directory
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.

2 participants