someone added a "Can't find the file specified: cue filename" for when ANY error happened (including when bin files couldn't be found), before the error message which would have said "Can't find the bin file specified by the cue file". probably while doing null-related refactor bullshit because they had to throw some exception instead of adopting a null value. fix that by undoing the null-related refactor bullshit and adopting the value which is known not to be null (to us, if not the nagging linter) after checking for the intended error conditions and throwing if they're set. fixes #2819 (probably)
This commit is contained in:
parent
28ff96deb5
commit
0a290fa756
|
@ -18,8 +18,7 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
//--- load the disc in a context which will let us abort if it's going to take too long
|
||||
var discMountJob = new DiscMountJob(fromPath: path, slowLoadAbortThreshold: 8);
|
||||
discMountJob.Run();
|
||||
var disc = discMountJob.OUT_Disc ?? throw new InvalidOperationException($"Can't find the file specified: {path}");
|
||||
|
||||
|
||||
if (discMountJob.OUT_SlowLoadAborted)
|
||||
{
|
||||
errorCallback("This disc would take too long to load. Run it through DiscoHawk first, or find a new rip because this one is probably junk");
|
||||
|
@ -31,6 +30,8 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
throw new InvalidOperationException($"\r\n{discMountJob.OUT_Log}");
|
||||
}
|
||||
|
||||
var disc = discMountJob.OUT_Disc;
|
||||
|
||||
var discType = new DiscIdentifier(disc).DetectDiscType();
|
||||
|
||||
if (type.HasValue && discType != type)
|
||||
|
|
Loading…
Reference in New Issue