Get the app directory via an absolute path instead of a relative one. #547

Merged
gyroninja merged 2 commits from master into master 2017-09-12 00:23:44 +02:00
gyroninja commented 2017-09-10 06:58:04 +02:00 (Migrated from github.com)

In the internationalization code it is assumed that the app directory is in the current working directory.
This causes problems when the current working directory is not where it is expected. Before some of the internationalization code was temporarily disabled (a return was inserted at the begging of the doDownloadLanguages function), on startup it would get stuck and display a pure cyan screen. In the background it would start the daemon and everything, but it would not display anything but the cyan background. This was reported by me in #516.
This PR proposes that instead of assuming that the app folder for the application is in our current working directory, we grab the path of the app folder directly from Electron itself. We grab this directory by using Electron's remote module, which is made to be used by the render thread, to grab an instance of the Electron app object to get the path that we need.

In the internationalization code it is assumed that the app directory is in the current working directory. This causes problems when the current working directory is not where it is expected. Before some of the internationalization code was temporarily disabled (a return was inserted at the begging of the doDownloadLanguages function), on startup it would get stuck and display a pure cyan screen. In the background it would start the daemon and everything, but it would not display anything but the cyan background. This was reported by me in #516. This PR proposes that instead of assuming that the app folder for the application is in our current working directory, we grab the path of the app folder directly from Electron itself. We grab this directory by using Electron's remote module, which is made to be used by the render thread, to grab an instance of the Electron app object to get the path that we need.
kauffj (Migrated from github.com) reviewed 2017-09-10 06:58:04 +02:00
kauffj commented 2017-09-12 00:24:19 +02:00 (Migrated from github.com)

Thanks @gyroninja! Please DM @kauffj in our Slack or email jeremy@lbry.io if you'd like a tip for this PR.

Thanks @gyroninja! Please DM @kauffj in our Slack or email jeremy@lbry.io if you'd like a tip for this PR.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#547
No description provided.