From b454ac003b867497168980874dc80499bf26c3f5 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Sun, 4 Oct 2015 15:36:56 -0400 Subject: [PATCH] Present error message if HTML Export path does not exist --- gui/mainFrame.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gui/mainFrame.py b/gui/mainFrame.py index 873e5ea62..f403baaab 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -653,6 +653,15 @@ class MainFrame(wx.Frame): max = sFit.countAllFits() path = settings.getPath() + + if not os.path.isdir(os.path.dirname(path)): + dlg = wx.MessageDialog(self, + "Invalid Path\n\nThe following path is invalid or does not exist: \n%s\n\nPlease verify path location pyfa's preferences."%path, + "Error", wx.OK | wx.ICON_ERROR) + + if dlg.ShowModal() == wx.ID_OK: + return + self.progressDialog = wx.ProgressDialog("Backup fits", "Generating HTML file at: %s"%path, maximum=max, parent=self,