TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ PortOldSaveDirectories()

static void Terraria.Program.PortOldSaveDirectories ( string savePath)
inlinestaticprivate

Definition at line 316 of file Program.cs.

317 {
318 string oldBetas = Path.Combine(savePath, "ModLoader", "Beta");
319 if (!Directory.Exists(oldBetas))
320 {
321 return;
322 }
323 Logging.tML.Info((object)("Old tModLoader alpha folder \"" + oldBetas + "\" found, attempting folder migration"));
324 string newPath = Path.Combine(savePath, "tModLoader");
325 if (Directory.Exists(newPath))
326 {
327 Logging.tML.Warn((object)$"Both \"{oldBetas}\" and \"{newPath}\" exist, assuming user launched old tModLoader alpha, aborting migration");
328 return;
329 }
330 Logging.tML.Info((object)$"Migrating from \"{oldBetas}\" to \"{newPath}\"");
332 Logging.tML.Info((object)"Old alpha folder to new location migration success");
333 string[] array = new string[3] { "Mod Reader", "Mod Sources", "Mod Configs" };
334 foreach (string subDir in array)
335 {
336 string newSaveOriginalSubDirPath = Path.Combine(newPath, subDir);
338 {
339 string newSaveNewSubDirPath = Path.Combine(newPath, subDir.Replace(" ", ""));
340 Logging.tML.Info((object)$"Renaming from \"{newSaveOriginalSubDirPath}\" to \"{newSaveNewSubDirPath}\"");
342 }
343 }
344 Logging.tML.Info((object)"Folder Renames Success");
345 }

References Terraria.ModLoader.Logging.tML.

Referenced by Terraria.Program.PortFilesMaster().

+ Here is the caller graph for this function: