summaryrefslogtreecommitdiff
path: root/onionshare_gui
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2020-06-30 14:53:38 -0700
committerMicah Lee <micah@micahflee.com>2020-06-30 14:53:38 -0700
commit25cb1c19f470f09b86e3ea0a2a4340d87fb511ff (patch)
tree07d816b847f69ac3c39308abbd312a0e45d17edc /onionshare_gui
parent7b5c8e8b31f171083588586c5737bfb4f3a13486 (diff)
downloadonionshare-25cb1c19f470f09b86e3ea0a2a4340d87fb511ff.tar.gz
onionshare-25cb1c19f470f09b86e3ea0a2a4340d87fb511ff.zip
Simplify flatpak detection
Diffstat (limited to 'onionshare_gui')
-rw-r--r--onionshare_gui/gui_common.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/onionshare_gui/gui_common.py b/onionshare_gui/gui_common.py
index 7eb4f0e8..eb259301 100644
--- a/onionshare_gui/gui_common.py
+++ b/onionshare_gui/gui_common.py
@@ -18,7 +18,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import os
-import json
from onionshare import strings
from onionshare.onion import Onion
@@ -39,16 +38,7 @@ class GuiCommon:
self.local_only = local_only
# Are we running in a flatpak package?
- self.is_flatpak = False
- if os.path.exists("/app/manifest.json"):
- try:
- with open("/app/manifest.json") as f:
- manifest_data = json.loads(f.read())
- if manifest_data["id"] == "org.onionshare.OnionShare":
- self.is_flatpak = True
- self.common.log("GuiCommon", "__init__", "is_flatpak=True")
- except:
- pass
+ self.is_flatpak = os.path.exists("/.flatpak-info")
# Load settings
self.common.load_settings()