Block cluttering of the user's home folder

This commit is contained in:
Veronica K. B. Olsen
2020-10-04 16:38:53 +02:00
parent eaf8e83d40
commit 2cc12490d8
3 changed files with 11 additions and 8 deletions
+5 -4
View File
@@ -320,11 +320,12 @@ class GuiWritingStats(QDialog):
# Generate the file name
if fileExt:
fileName = "sessionStats.%s" % fileExt
saveDir = self.mainConf.lastPath
savePath = os.path.join(saveDir, fileName)
saveDir = self.mainConf.lastPath
if not os.path.isdir(saveDir):
saveDir = self.mainConf.homePath
saveDir = os.path.expanduser("~")
fileName = "sessionStats.%s" % fileExt
savePath = os.path.join(saveDir, fileName)
dlgOpt = QFileDialog.Options()
dlgOpt |= QFileDialog.DontUseNativeDialog