mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Merge pull request #369 from CocoTheOwner/Improve-progess-indicator-pregen
Update ProjectManager.java
This commit is contained in:
commit
1d37910bd4
@ -240,7 +240,20 @@ public class ProjectManager
|
|||||||
"\n5. Contact support (if all other options do not help)"
|
"\n5. Contact support (if all other options do not help)"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
File dir = work.listFiles().length == 1 && work.listFiles()[0].isDirectory() ? work.listFiles()[0] : null;
|
File dir = null;
|
||||||
|
File[] zipFiles = work.listFiles();
|
||||||
|
|
||||||
|
if (zipFiles == null) {
|
||||||
|
sender.sendMessage("No files were extracted from the zip file.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
dir = zipFiles.length == 1 && zipFiles[0].isDirectory() ? zipFiles[0] : null;
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
sender.sendMessage("Error when finding home directory. Are there any non-text characters in the file name?");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(dir == null)
|
if(dir == null)
|
||||||
{
|
{
|
||||||
@ -256,7 +269,11 @@ public class ProjectManager
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dimensions.listFiles().length != 1)
|
if(dimensions.listFiles() == null){
|
||||||
|
sender.sendMessage("No dimension file found in the extracted zip file.");
|
||||||
|
sender.sendMessage("Check it is there on GitHub and report this to staff!");
|
||||||
|
}
|
||||||
|
else if (dimensions.listFiles().length != 1)
|
||||||
{
|
{
|
||||||
sender.sendMessage("Dimensions folder must have 1 file in it");
|
sender.sendMessage("Dimensions folder must have 1 file in it");
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user