Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethink RuntimeDir fallback handling #4852

Open
The-Compiler opened this issue Jun 18, 2019 · 0 comments
Open

Rethink RuntimeDir fallback handling #4852

The-Compiler opened this issue Jun 18, 2019 · 0 comments
Labels
bug: behavior Something doesn't work as intended, but doesn't crash. priority: 2 - low Issues which are currently not very important.

Comments

@The-Compiler
Copy link
Member

The-Compiler commented Jun 18, 2019

def _init_runtime(args):
"""Initialize location for runtime data."""
if utils.is_linux:
typ = QStandardPaths.RuntimeLocation
else:
# RuntimeLocation is a weird path on macOS and Windows.
typ = QStandardPaths.TempLocation
overridden, path = _from_args(typ, args)
if not overridden:
try:
path = _writable_location(typ)
except EmptyValueError:
# Fall back to TempLocation when RuntimeLocation is misconfigured
if typ == QStandardPaths.TempLocation:
raise
path = _writable_location(QStandardPaths.TempLocation)
# This is generic, but per-user.
# _writable_location makes sure we have a qutebrowser-specific subdir.
#
# For TempLocation:
# "The returned value might be application-specific, shared among
# other applications for this user, or even system-wide."
#
# 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)
_locations[_Location.runtime] = path

  • Why did we need that fallback on macOS/Windows?
  • Right now we use the fallback on BSD as well - should we?
  • Can we at least add the UID or something, so multiple users can use qutebrowser with the fallback dir?

Also see #888

@The-Compiler The-Compiler added priority: 2 - low Issues which are currently not very important. bug: behavior Something doesn't work as intended, but doesn't crash. labels Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: behavior Something doesn't work as intended, but doesn't crash. priority: 2 - low Issues which are currently not very important.
Projects
None yet
Development

No branches or pull requests

1 participant