diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-03-18 08:46:25 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-03-18 10:55:15 +0100 |
commit | 8adac6948bb5c8b41da4650229f8c3469f7ee033 (patch) | |
tree | f174183db83c9724d03e8eb52d371491d1db8460 | |
parent | b4345fb458b4015e4533f2f16452c6f8f1a40d5c (diff) | |
download | qutebrowser-8adac6948bb5c8b41da4650229f8c3469f7ee033.tar.gz qutebrowser-8adac6948bb5c8b41da4650229f8c3469f7ee033.zip |
Use correct runtime path for Flatpak
See #6300
(cherry picked from commit 9f67a763ef86805f0981f037ccd2fb5cb0e84b88)
-rw-r--r-- | qutebrowser/utils/standarddir.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/qutebrowser/utils/standarddir.py b/qutebrowser/utils/standarddir.py index f94d46061..4a571696f 100644 --- a/qutebrowser/utils/standarddir.py +++ b/qutebrowser/utils/standarddir.py @@ -232,7 +232,14 @@ def _init_runtime(args: Optional[argparse.Namespace]) -> None: # Unfortunately this path could get too long for sockets (which have a # maximum length of 104 chars), so we don't add the username here... - _create(path) + from qutebrowser.utils import version + if version.is_sandboxed(): + *parts, app_name = os.path.split(path) + assert app_name == APPNAME, app_name + path = os.path.join(*parts, 'app', os.environ['FLATPAK_ID']) + else: + _create(path) + _locations[_Location.runtime] = path |