diff options
author | Micah Lee <micah@micahflee.com> | 2020-06-30 14:53:38 -0700 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2020-06-30 14:53:38 -0700 |
commit | 25cb1c19f470f09b86e3ea0a2a4340d87fb511ff (patch) | |
tree | 07d816b847f69ac3c39308abbd312a0e45d17edc /onionshare_gui | |
parent | 7b5c8e8b31f171083588586c5737bfb4f3a13486 (diff) | |
download | onionshare-25cb1c19f470f09b86e3ea0a2a4340d87fb511ff.tar.gz onionshare-25cb1c19f470f09b86e3ea0a2a4340d87fb511ff.zip |
Simplify flatpak detection
Diffstat (limited to 'onionshare_gui')
-rw-r--r-- | onionshare_gui/gui_common.py | 12 |
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() |