diff --git a/.gitignore b/.gitignore index 9260acd3..7873a701 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ ToC.txt # Coverage /.coverage +/coverage.* diff --git a/nw/tools/build.py b/nw/tools/build.py index 58526af5..692498c8 100644 --- a/nw/tools/build.py +++ b/nw/tools/build.py @@ -853,10 +853,10 @@ class GuiBuildNovel(QDialog): cleanName = makeFileNameSafe(self.theProject.projName) fileName = "%s.%s" % (cleanName, fileExt) saveDir = self.mainConf.lastPath - savePath = os.path.join(saveDir, fileName) if not os.path.isdir(saveDir): - saveDir = self.mainConf.homePath + saveDir = os.path.expanduser("~") + savePath = os.path.join(saveDir, fileName) savePath, _ = QFileDialog.getSaveFileName( self, self.tr("Save Document As"), savePath ) diff --git a/nw/tools/projwizard.py b/nw/tools/projwizard.py index 81b885e8..a5bedcc6 100644 --- a/nw/tools/projwizard.py +++ b/nw/tools/projwizard.py @@ -210,7 +210,7 @@ class ProjWizardFolderPage(QWizardPage): """ lastPath = self.mainConf.lastPath if not os.path.isdir(lastPath): - lastPath = "" + lastPath = os.path.expanduser("~") projDir = QFileDialog.getExistingDirectory( self, self.tr("Select Project Folder"), lastPath, options=QFileDialog.ShowDirsOnly