Merge branch 'Carpetsmoker-editor_temp_name'

This commit is contained in:
Florian Bruhin 2015-05-29 23:47:40 +02:00
commit 6d592c7c75
3 changed files with 4 additions and 2 deletions

View File

@ -147,6 +147,7 @@ Contributors, sorted by the number of commits in descending order:
* rikn00
* Patric Schmitz
* Martin Zimmermann
* Martin Tournoij
* Error 800
* Brian Jackson
* sbinix

View File

@ -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)

View File

@ -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: