Skip to content

Commit a1f2e97

Browse files
committed
Fixed an issue with the export feature when the file already exists.
1 parent a7d989d commit a1f2e97

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

addon/globalPlugins/Access8Math/editor.py

+6
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,12 @@ def OnExport(self, event):
376376
) as entryDialog:
377377
if entryDialog.ShowModal() == wx.ID_OK:
378378
dst = entryDialog.GetPath()
379+
380+
if os.path.exists(dst + ".a8m"):
381+
os.remove(dst + ".a8m")
382+
if os.path.exists(dst + ".zip"):
383+
os.remove(dst + ".zip")
384+
379385
shutil.make_archive(dst, 'zip', self.ad.a8m_folder)
380386
os.rename(dst + ".zip", dst + ".a8m")
381387
shutil.make_archive(dst, 'zip', self.ad.review_folder)

0 commit comments

Comments
 (0)