Make some minor improvements

This commit is contained in:
Veronica Berglyd Olsen
2023-12-01 18:18:26 +01:00
parent ecaaffb029
commit 6d769cb512
2 changed files with 2 additions and 4 deletions
+2 -2
View File
@@ -131,7 +131,7 @@ class NWStorage:
def isOpen(self) -> bool:
"""Check if the storage location is open."""
return self._runtimePath is not None
return self._ready and self._runtimePath is not None
def createNewProject(self, path: str | Path) -> bool:
"""Create a new project at the given location."""
@@ -170,7 +170,7 @@ class NWStorage:
# ===========================
# Check what we're opening. Only two options are allowed:
# 1. A folder with a nwProject.nwx file in it (not home)
# 1. A folder with an 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():
nwxFile = inPath / nwFiles.PROJ_FILE
-2
View File
@@ -118,8 +118,6 @@ def fncPath():
fncPath = _TMP_ROOT / "function"
if fncPath.is_dir():
shutil.rmtree(fncPath)
elif fncPath.is_file():
fncPath.unlink()
fncPath.mkdir(exist_ok=True)
return fncPath