328 if not ext: |
328 if not ext: |
329 ex = selectedFilter.split("(*")[1].split(")")[0] |
329 ex = selectedFilter.split("(*")[1].split(")")[0] |
330 if ex: |
330 if ex: |
331 fname += ex |
331 fname += ex |
332 if QFileInfo(fname).exists(): |
332 if QFileInfo(fname).exists(): |
333 res = E5MessageBox.warning(self, |
333 res = E5MessageBox.yesNo(self, |
334 self.trUtf8("Save Diff"), |
334 self.trUtf8("Save Diff"), |
335 self.trUtf8("<p>The patch file <b>{0}</b> already exists.</p>") |
335 self.trUtf8("<p>The patch file <b>{0}</b> already exists." |
336 .format(fname), |
336 " Overwrite it?</p>").format(fname), |
337 QMessageBox.StandardButtons(\ |
337 type_ = E5MessageBox.Warning) |
338 QMessageBox.Abort | \ |
338 if not res: |
339 QMessageBox.Save), |
|
340 QMessageBox.Abort) |
|
341 if res != QMessageBox.Save: |
|
342 return |
339 return |
343 fname = Utilities.toNativeSeparators(fname) |
340 fname = Utilities.toNativeSeparators(fname) |
344 |
341 |
345 try: |
342 try: |
346 f = open(fname, "w", encoding = "utf-8") |
343 f = open(fname, "w", encoding = "utf-8") |