mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-26 15:57:22 +01:00
fix json project & workspace file paths when migrating from binary
This commit is contained in:
@@ -241,9 +241,9 @@ public class Project implements ProjectTreeNode, Serializable, JsonSerializable
|
||||
return null;
|
||||
} else {
|
||||
p = (Project) SettingsSave.loadInstance(f, "Project");
|
||||
p.baseFolder = projRoot;
|
||||
}
|
||||
p.save();
|
||||
|
||||
}
|
||||
p.refreshTransients(w);
|
||||
return p;
|
||||
|
||||
@@ -115,7 +115,7 @@ public class Workspace implements ProjectTreeNode, Serializable, JsonSerializabl
|
||||
w = loadWorkspaceFromJson(workspaceRoot, f2);
|
||||
w.refreshTransients();
|
||||
} else {
|
||||
Notification.addInfo("Could not find json workspace file. Falling back to binary");
|
||||
Notification.addInfo("Could not find json workspace file. Checking for binary file");
|
||||
File f = new File(workspaceRoot, WS_SETTINGS_FILE);
|
||||
if (!workspaceRoot.exists() || !f.exists()) {
|
||||
w = new Workspace(workspaceRoot);
|
||||
@@ -123,10 +123,13 @@ public class Workspace implements ProjectTreeNode, Serializable, JsonSerializabl
|
||||
w = (Workspace) SettingsSave.loadInstance(f, "Workspace");
|
||||
if (w == null) {
|
||||
w = new Workspace(workspaceRoot);
|
||||
w.save();
|
||||
} else {
|
||||
w.settingsFile = f2;
|
||||
w.baseFolder = workspaceRoot;
|
||||
Notification.addInfo("Switched workspace to json format.");
|
||||
w.refreshTransients();
|
||||
}
|
||||
w.save();
|
||||
}
|
||||
}
|
||||
activeWorkspace = w;
|
||||
|
||||
Reference in New Issue
Block a user