Commit 9497dce2 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Don't clean up temp file to early

We have to preserve it until the file transfer is finished
parent 4b2dc9f3
......@@ -26,7 +26,7 @@
import os
import time
import uuid
from tempfile import TemporaryDirectory
import tempfile
from gi.repository import Gtk
from gi.repository import Gdk
......@@ -793,15 +793,12 @@ class ChatControlBase(ChatCommandProcessor, CommandTools, EventHelper):
if is_checked:
app.config.set('confirm_paste_image', False)
tmp_dir = TemporaryDirectory()
dir_ =
path = os.path.join(dir_, '0.png')
dir_ = tempfile.gettempdir()
path = os.path.join(dir_, '%s.png' % str(uuid.uuid4()))
image.savev(path, 'png', [], [])
def _get_pref_ft_method(self):
ft_pref = app.config.get_per('accounts', self.account,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment