Commits

Yuya Nishihara committed c04997b

rejects: handle non-ascii path correctly

QFile is unicode API.

  • Participants
  • Parent commits 5ec7361
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/rejects.py

         self.editor.loadSettings(s, 'rejects/editor')
         self.rejectbrowser.loadSettings(s, 'rejects/rejbrowse')
 
-        f = QFile(path)
+        f = QFile(hglib.tounicode(path))
         if not f.open(QIODevice.ReadOnly):
             qtlib.ErrorMsgBox(_('Unable to merge rejects'),
                               _("Can't read this file (maybe deleted)"))
                 acceptresolution = True
 
         if acceptresolution:
-            f = QFile(self.path)
+            f = QFile(hglib.tounicode(self.path))
             f.open(QIODevice.WriteOnly)
             self.editor.write(f)
             self.saveSettings()