288 if not ext: |
288 if not ext: |
289 ex = selectedFilter.split("(*")[1].split(")")[0] |
289 ex = selectedFilter.split("(*")[1].split(")")[0] |
290 if ex: |
290 if ex: |
291 fname += ex |
291 fname += ex |
292 if QFileInfo(fname).exists(): |
292 if QFileInfo(fname).exists(): |
293 res = E5MessageBox.warning(self, |
293 res = E5MessageBox.yesNo(self, |
294 self.trUtf8("Save Diff"), |
294 self.trUtf8("Save Diff"), |
295 self.trUtf8("<p>The patch file <b>{0}</b> already exists.</p>") |
295 self.trUtf8("<p>The patch file <b>{0}</b> already exists." |
296 .format(fname), |
296 " Overwrite it?</p>").format(fname), |
297 QMessageBox.StandardButtons(\ |
297 type_ = E5MessageBox.Warning) |
298 QMessageBox.Abort | \ |
298 if not res: |
299 QMessageBox.Save), |
|
300 QMessageBox.Abort) |
|
301 if res != QMessageBox.Save: |
|
302 return |
299 return |
303 fname = Utilities.toNativeSeparators(fname) |
300 fname = Utilities.toNativeSeparators(fname) |
304 |
301 |
305 try: |
302 try: |
306 f = open(fname, "w", encoding = "utf-8") |
303 f = open(fname, "w", encoding = "utf-8") |