61 if Preferences.getProject("TimestampFile"): |
62 if Preferences.getProject("TimestampFile"): |
62 projectDict["header"]["saved"] = ( |
63 projectDict["header"]["saved"] = ( |
63 time.strftime('%Y-%m-%d, %H:%M:%S') |
64 time.strftime('%Y-%m-%d, %H:%M:%S') |
64 ) |
65 ) |
65 |
66 |
66 projectDict["project"] = self.__project.pdata |
67 projectDict["project"] = copy.deepcopy(self.__project.pdata) |
67 |
68 |
68 # modify paths to contain universal separators |
69 # modify paths to contain universal separators |
69 for key in ( |
70 for key in ( |
70 "SOURCES", "FORMS", "TRANSLATIONS", "TRANSLATIONEXCEPTIONS", |
71 "SOURCES", "FORMS", "TRANSLATIONS", "TRANSLATIONEXCEPTIONS", |
71 "RESOURCES", "INTERFACES", "PROTOCOLS", "OTHERS" |
72 "RESOURCES", "INTERFACES", "PROTOCOLS", "OTHERS" |
72 ): |
73 ): |
73 with contextlib.suppress(KeyError): |
74 with contextlib.suppress(KeyError): |
74 projectDict["project"][key] = [ |
75 projectDict["project"][key] = sorted([ |
75 Utilities.fromNativeSeparators(f) |
76 Utilities.fromNativeSeparators(f) |
76 for f in projectDict["project"][key] |
77 for f in projectDict["project"][key] |
77 ] |
78 ]) |
78 for key in ( |
79 for key in ( |
79 "SPELLWORDS", "SPELLEXCLUDES", "TRANSLATIONPATTERN", |
80 "SPELLWORDS", "SPELLEXCLUDES", "TRANSLATIONPATTERN", |
80 "TRANSLATIONSBINPATH", "MAINSCRIPT" |
81 "TRANSLATIONSBINPATH", "MAINSCRIPT" |
81 ): |
82 ): |
82 with contextlib.suppress(KeyError): |
83 with contextlib.suppress(KeyError): |