mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-02 06:26:10 -04:00
Detect Flatpak via environment variable
This commit is contained in:
parent
a5893225fc
commit
54689eada8
2 changed files with 11 additions and 10 deletions
|
@ -432,6 +432,12 @@ class Common:
|
|||
r = random.SystemRandom()
|
||||
return "-".join(r.choice(wordlist) for _ in range(word_count))
|
||||
|
||||
def is_flatpak(self):
|
||||
"""
|
||||
Returns True if OnionShare is running in a Flatpak sandbox
|
||||
"""
|
||||
return os.environ.get("FLATPAK_ID") == "org.onionshare.OnionShare"
|
||||
|
||||
@staticmethod
|
||||
def random_string(num_bytes, output_len=None):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue