9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-29 12:09:07 +00:00

More fixes

This commit is contained in:
Daniel Mills
2020-11-27 19:26:41 -05:00
parent ad01a157ce
commit b6fdde403a
4 changed files with 33 additions and 4 deletions

View File

@@ -58,11 +58,12 @@ public class IrisProject
try
{
File f = d.getLoader().getDataFolder();
boolean foundWork = false;
for(File i : f.listFiles())
{
if(i.getName().endsWith(".code-workspace"))
{
foundWork = true;
sender.sendMessage("Updating Workspace...");
J.a(() ->
{
@@ -78,6 +79,25 @@ public class IrisProject
break;
}
}
if(!foundWork)
{
File ff = new File(d.getLoader().getDataFolder(), d.getLoadKey() + ".code-workspace");
Iris.warn("Project missing code-workspace: " + ff.getAbsolutePath() + " Re-creating code workspace.");
try
{
IO.writeAll(ff, createCodeWorkspaceConfig());
}
catch(IOException e1)
{
e1.printStackTrace();
}
sender.sendMessage("Updating Workspace...");
updateWorkspace();
sender.sendMessage("Workspace Updated");
}
}
catch(Throwable e)