Clean up old json files
This commit is contained in:
@@ -26,10 +26,6 @@ class nwFiles():
|
|||||||
SESS_INFO = "sessionInfo.log"
|
SESS_INFO = "sessionInfo.log"
|
||||||
INDEX_FILE = "tagsIndex.json"
|
INDEX_FILE = "tagsIndex.json"
|
||||||
OPTS_FILE = "guiOptions.json"
|
OPTS_FILE = "guiOptions.json"
|
||||||
EXPORT_OPT = "exportOptions.json"
|
|
||||||
TLINE_OPT = "timelineOptions.json"
|
|
||||||
SLOG_OPT = "sessionLogOptions.json"
|
|
||||||
MERGE_OPT = "docMergeOptions.json"
|
|
||||||
|
|
||||||
# END Class nwFiles
|
# END Class nwFiles
|
||||||
|
|
||||||
|
|||||||
@@ -44,4 +44,20 @@ def projectMaintenance(theProject):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(str(e))
|
logger.error(str(e))
|
||||||
|
|
||||||
|
# Remove no longer used meta files
|
||||||
|
rmList = []
|
||||||
|
rmList.append(path.join(theProject.projMeta, "mainOptions.json"))
|
||||||
|
rmList.append(path.join(theProject.projMeta, "exportOptions.json"))
|
||||||
|
rmList.append(path.join(theProject.projMeta, "outlineOptions.json"))
|
||||||
|
rmList.append(path.join(theProject.projMeta, "timelineOptions.json"))
|
||||||
|
rmList.append(path.join(theProject.projMeta, "docMergeOptions.json"))
|
||||||
|
rmList.append(path.join(theProject.projMeta, "sessionLogOptions.json"))
|
||||||
|
for rmFile in rmList:
|
||||||
|
if path.isfile(rmFile):
|
||||||
|
logger.info("Deleting: %s" % rmFile)
|
||||||
|
try:
|
||||||
|
unlink(rmFile)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(str(e))
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user