Changeset 2a670e5 in tol
- Timestamp:
- Feb 1, 2012, 6:59:59 PM (15 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 23f300d
- Parents:
- 2f5c82f1
- File:
-
- 1 edited
-
tol/stdlib/TolConfigManager/methods.tol (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/stdlib/TolConfigManager/methods.tol
r2f5c82f1 r2a670e5 144 144 { 145 145 //WriteLn("TRACE [LoadConfig] 1"); 146 Real Case(!FileExist(_.path),146 Text lastPath = If(FileExist(_.path),_.path, 147 147 { 148 //WriteLn("TRACE [LoadConfig] 2.1"); 148 Set tolAppFiles = GetDir(TolAppDataPath)[1]; 149 Set tolAppConfig = Select(tolAppFiles,Real(Text fName) 150 { 151 TextBeginWith(fName,".tolConfig.") & 152 TextEndAt (fName,".tol") 153 }); 154 Set versions = EvalSet(tolAppConfig,Text(Text fName) 155 { 156 Replace(Replace(fName,".tolConfig.",""),".tol","") 157 }); 158 Set versions.sort = Sort(versions, Real(Text a, Text b) 159 { 160 Compare.VersionString(b,a) 161 }); 162 TolAppDataPath+".tolConfig."+versions.sort[1]+".tol" 163 }); 164 //WriteLn("TRACE [LoadConfig] 2 _.path='"+_.path+"'"); 165 //WriteLn("TRACE [LoadConfig] 3 lastPath='"+lastPath+"'"); 166 Real Case(!FileExist(lastPath), 167 { 168 //WriteLn("TRACE [LoadConfig] 4.1"); 149 169 Real SaveConfig(Default); 150 170 NameBlock Config := Include(_.path)[1]; … … 153 173 1==1, 154 174 { 155 //WriteLn("TRACE [LoadConfig] 2.2");175 //WriteLn("TRACE [LoadConfig] 4.2"); 156 176 NameBlock Config := 157 MergeOptions(TolConfigManager::Default, { Include( _.path)[1] },177 MergeOptions(TolConfigManager::Default, { Include(lastPath)[1] }, 158 178 "TolConfigManager::Config::"); 159 179 Real SaveConfig(Config)
Note: See TracChangeset
for help on using the changeset viewer.
