Make some minor corrections

This commit is contained in:
Veronica Berglyd Olsen
2023-11-30 22:53:52 +01:00
parent d11a8ee789
commit f2b35d798b
3 changed files with 4 additions and 6 deletions
+1 -2
View File
@@ -306,8 +306,7 @@ class NWProject:
self._loadProjectLocalisation()
# Update recent projects
storePath = self._storage.storagePath
if storePath:
if storePath := self._storage.storagePath:
CONFIG.recentProjects.update(
storePath, self._data.name, sum(self._data.initCounts), time()
)
+2 -2
View File
@@ -163,13 +163,13 @@ class NWStorage:
return True
def initProjectStorage(self, path: str | Path, clearLock: bool = False) -> NWStorageOpen:
"""Initialise the a novelWriter project."""
"""Initialise a novelWriter project location."""
inPath = Path(path).resolve()
# Initialise Storage Instance
# ===========================
# Check what we're opening. Only three options are allowed:
# Check what we're opening. Only two options are allowed:
# 1. A folder with a nwProject.nwx file in it (not home)
# 2. A full path to an nwProject.nwx file
if inPath.is_dir() and inPath != Path.home().resolve():
+1 -2
View File
@@ -462,8 +462,7 @@ class GuiMain(QMainWindow):
if projFile is None:
return False
# Make sure any open project is cleared out first before we load
# another one
# Make sure any open project is cleared out first
if not self.closeProject():
return False