diff --git a/Dropchat.py b/Dropchat.py index 21f529a..9b11e79 100644 --- a/Dropchat.py +++ b/Dropchat.py @@ -144,8 +144,8 @@ class applicazione(tkinter.Frame): #copia il file nel buffer def aggiorna(self): - self.temp.close() - self.temp = tempfile.TemporaryFile(mode="w+t") + self.temp.seek(0) + self.temp.truncate() if self.file != "": with open(self.file) as testo: self.temp.write(testo.read())