Add some error messages

Can get annoying if multiple folders contain 'rom'
This commit is contained in:
Kurt
2017-01-14 16:32:43 -08:00
parent c9eb0eb714
commit 30f43d0600

View File

@@ -303,12 +303,14 @@ private bool checkIfRomFS(string path)
// Check to see if the folder is romfs
if (fi.Name == "a")
{
var cfg = checkGameType(Directory.GetFiles(path, "*", SearchOption.AllDirectories));
string[] files = Directory.GetFiles(path, "*", SearchOption.AllDirectories);
var cfg = checkGameType(files);
if (cfg == null)
{
RomFSPath = null;
Config = null;
Util.Error("File count does not match expected game count.", "Files: " + files.Length);
return false;
}
@@ -318,6 +320,7 @@ private bool checkIfRomFS(string path)
Randomizer.MaxSpeciesID = cfg.MaxSpeciesID;
return true;
}
Util.Error("Folder does not contain an 'a' folder in the top level.");
RomFSPath = null;
return false;
}