diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 64c277c9f..d125d1d1a 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -70,7 +70,7 @@ def run(args): sys.exit(usertypes.Exit.ok) if args.temp_basedir: - args.basedir = tempfile.mkdtemp() + args.basedir = tempfile.mkdtemp(prefix='qutebrowser-basedir-') quitter = Quitter(args) objreg.register('quitter', quitter) diff --git a/qutebrowser/misc/editor.py b/qutebrowser/misc/editor.py index 81323bf5e..32e4100ca 100644 --- a/qutebrowser/misc/editor.py +++ b/qutebrowser/misc/editor.py @@ -122,7 +122,8 @@ class ExternalEditor(QObject): raise ValueError("Already editing a file!") self._text = text try: - self._oshandle, self._filename = tempfile.mkstemp(text=True) + self._oshandle, self._filename = tempfile.mkstemp( + text=True, prefix='qutebrowser-editor-') if text: encoding = config.get('general', 'editor-encoding') with open(self._filename, 'w', encoding=encoding) as f: