Fixed a bug in project open where old projects were converted before asking permision
This commit is contained in:
+13
-7
@@ -390,16 +390,11 @@ class NWProject():
|
|||||||
# Check for Old Legacy Data
|
# Check for Old Legacy Data
|
||||||
# =========================
|
# =========================
|
||||||
|
|
||||||
errList = []
|
legacyList = [] # Cleanup is done later
|
||||||
for projItem in listdir(self.projPath):
|
for projItem in listdir(self.projPath):
|
||||||
logger.verbose("Project contains: %s" % projItem)
|
logger.verbose("Project contains: %s" % projItem)
|
||||||
if projItem.startswith("data_"):
|
if projItem.startswith("data_"):
|
||||||
errList = self._legacyDataFolder(projItem, errList)
|
legacyList.append(projItem)
|
||||||
|
|
||||||
if errList:
|
|
||||||
self.makeAlert(errList, nwAlert.ERROR)
|
|
||||||
|
|
||||||
self._deprecatedFiles()
|
|
||||||
|
|
||||||
# Project Lock
|
# Project Lock
|
||||||
# ============
|
# ============
|
||||||
@@ -611,6 +606,17 @@ class NWProject():
|
|||||||
|
|
||||||
self.optState.loadSettings()
|
self.optState.loadSettings()
|
||||||
|
|
||||||
|
# Sort out old file locations
|
||||||
|
if legacyList:
|
||||||
|
errList = []
|
||||||
|
for projItem in legacyList:
|
||||||
|
errList = self._legacyDataFolder(projItem, errList)
|
||||||
|
if errList:
|
||||||
|
self.makeAlert(errList, nwAlert.ERROR)
|
||||||
|
|
||||||
|
# Clean up old files
|
||||||
|
self._deprecatedFiles()
|
||||||
|
|
||||||
# Update recent projects
|
# Update recent projects
|
||||||
self.mainConf.updateRecentCache(self.projPath, self.projName, self.lastWCount, time())
|
self.mainConf.updateRecentCache(self.projPath, self.projName, self.lastWCount, time())
|
||||||
self.mainConf.saveRecentCache()
|
self.mainConf.saveRecentCache()
|
||||||
|
|||||||
Reference in New Issue
Block a user