Commits

Yuya Nishihara  committed a713738

rejects: report I/O error on save file (refs #3284)

  • Participants
  • Parent commits 44132ac
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/rejects.py

 
         if acceptresolution:
             f = QFile(hglib.tounicode(self.path))
-            f.open(QIODevice.WriteOnly)
-            self.editor.write(f)
+            saved = f.open(QIODevice.WriteOnly) and self.editor.write(f)
+            if not saved:
+                qtlib.ErrorMsgBox(_('Unable to save file'),
+                                  f.errorString(), parent=self)
+                return
             self.saveSettings()
             super(RejectsDialog, self).accept()