diff --git a/nw/constants/constants.py b/nw/constants/constants.py index 80887188..3a24e4ff 100644 --- a/nw/constants/constants.py +++ b/nw/constants/constants.py @@ -26,10 +26,6 @@ class nwFiles(): SESS_INFO = "sessionInfo.log" INDEX_FILE = "tagsIndex.json" OPTS_FILE = "guiOptions.json" - EXPORT_OPT = "exportOptions.json" - TLINE_OPT = "timelineOptions.json" - SLOG_OPT = "sessionLogOptions.json" - MERGE_OPT = "docMergeOptions.json" # END Class nwFiles diff --git a/nw/tools/legacy.py b/nw/tools/legacy.py index 7b622cb6..0bc1e10a 100644 --- a/nw/tools/legacy.py +++ b/nw/tools/legacy.py @@ -44,4 +44,20 @@ def projectMaintenance(theProject): except Exception as 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