diff --git a/pesterchum-update-from3.14.nsi b/pesterchum-update-from3.14.nsi index a4451d5..1dac4b0 100644 --- a/pesterchum-update-from3.14.nsi +++ b/pesterchum-update-from3.14.nsi @@ -63,7 +63,7 @@ Section "Pesterchum" CreateShortcut "$DESKTOP\Pesterchum.lnk" "$INSTDIR\pesterchum.exe" CreateShortcut "$SMPROGRAMS\Pesterchum\Readme.lnk" "$INSTDIR\readme.txt" CreateShortcut "$SMPROGRAMS\Pesterchum\Uninstall.lnk" "$INSTDIR\uninstall.exe" - CreateShortcut "$SMPROGRAMS\Pesterchum\Logs.lnk" "$INSTDIR\logs" + CreateShortcut "$SMPROGRAMS\Pesterchum\Logs.lnk" "$LOCALAPPDATA\pesterchum\logs" Goto done diff --git a/pesterchum.nsi b/pesterchum.nsi index d43aac7..60363c5 100644 --- a/pesterchum.nsi +++ b/pesterchum.nsi @@ -46,7 +46,7 @@ Section "Pesterchum" CreateShortcut "$DESKTOP\Pesterchum.lnk" "$INSTDIR\pesterchum.exe" CreateShortcut "$SMPROGRAMS\Pesterchum\Readme.lnk" "$INSTDIR\readme.txt" CreateShortcut "$SMPROGRAMS\Pesterchum\Uninstall.lnk" "$INSTDIR\uninstall.exe" - CreateShortcut "$SMPROGRAMS\Pesterchum\Logs.lnk" "$INSTDIR\logs" + CreateShortcut "$SMPROGRAMS\Pesterchum\Logs.lnk" "$LOCALAPPDATA\pesterchum\logs" SectionEnd diff --git a/profile.py b/profile.py index 65dc4d5..224f834 100644 --- a/profile.py +++ b/profile.py @@ -54,7 +54,14 @@ class PesterLog(object): for (format, t) in modes.iteritems(): if not os.path.exists("%s/%s/%s/%s" % (self.logpath, self.handle, handle, format)): os.makedirs("%s/%s/%s/%s" % (self.logpath, self.handle, handle, format)) - fp = codecs.open("%s/%s/%s/%s/%s.%s.txt" % (self.logpath, self.handle, handle, format, handle, time), encoding='utf-8', mode='a') + try: + fp = codecs.open("%s/%s/%s/%s/%s.%s.txt" % (self.logpath, self.handle, handle, format, handle, time), encoding='utf-8', mode='a') + except IOError: + msg = QtGui.QMessageBox(self) + msg.setText("Warning: Pesterchum could not open the log file for %s!" % (handle)) + msg.setInformativeText("Your log for %s will not be saved because something went wrong. We suggest restarting Pesterchum. Sorry :(" % (handle)) + msg.show() + continue self.convos[handle][format] = fp for (format, t) in modes.iteritems(): f = self.convos[handle][format]