Skip to content

Commit

Permalink
don't use flatpak env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
somas95 committed May 13, 2018
1 parent 2a85ad9 commit 0cbb9ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions flatpak/uberwriter.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
],
"build-options" : {
"env": {
"PYTHON": "python3",
"IN_FLATPAK": "1"
"PYTHON": "python3"
}
},
"add-extensions": {
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def package_files(directory):
pprint(extra_files_ui)
pprint(extra_files_media)

if os.environ.get('IN_FLATPAK'):
if os.path.isfile("/.flatpak-info"):
app_prefix = '/app/'
else:
app_prefix = ''
Expand Down
3 changes: 2 additions & 1 deletion uberwriter_lib/uberwriterconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def get_data_path():
"""

# Get pathname absolute or relative.
if os.environ.get("IN_FLATPAK"):
# TODO: Abstract this (the old env IN_FLATPAK)
if os.path.isfile("/.flatpak-info"):
return '/app/opt/uberwriter/data/'

path = os.path.join(
Expand Down

0 comments on commit 0cbb9ae

Please sign in to comment.