Make some minor corrections
This commit is contained in:
@@ -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()
|
||||
)
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user