Fix #417 - bad relative path breaks translations #733
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix-417-relative-path"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem: Translations don't work when user launches bitmessagemain.py from another directory, like “src/bimessagmain.py”.
This problem was caused by incorrect fallback to an empty string when _MEIPASS is not present. This happens when bitmessage is not running from a onefile executable. In that case, PyInstaller's variable _MEIPASS is not defined, and because empty string is chosen as root path, the path to translations can only work by accident - if user happens to be in that directory.
Solution: if _MEIPASS is not present, fall back to sys.path[0](the location of bitmessagemain.py) so that it works in both modes.
Thank you!