Catch filenotfound errors for non-PS3 ISOs
This commit is contained in:
+8
-10
@@ -302,10 +302,9 @@ namespace IRDKit
|
||||
}
|
||||
|
||||
// Write PS3_DISC.SFB info
|
||||
using (DiscUtils.Streams.SparseStream s = reader.OpenFile("PS3_DISC.SFB", FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
try
|
||||
{
|
||||
using DiscUtils.Streams.SparseStream s = reader.OpenFile("PS3_DISC.SFB", FileMode.Open, FileAccess.Read);
|
||||
PS3_DiscSFB ps3_DiscSFB = new(s);
|
||||
if (json)
|
||||
{
|
||||
@@ -322,17 +321,16 @@ namespace IRDKit
|
||||
else
|
||||
ps3_DiscSFB.Print(outPath);
|
||||
}
|
||||
catch
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
Console.WriteLine("PS3_DISC.SFB not found");
|
||||
}
|
||||
if (!json)
|
||||
Console.WriteLine("PS3_DISC.SFB not found. Not a valid PS3 ISO?");
|
||||
}
|
||||
|
||||
// Write PARAM.SFO info
|
||||
using (DiscUtils.Streams.SparseStream s = reader.OpenFile("PS3_GAME\\PARAM.SFO", FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
try
|
||||
{
|
||||
using DiscUtils.Streams.SparseStream s = reader.OpenFile("PS3_GAME\\PARAM.SFO", FileMode.Open, FileAccess.Read);
|
||||
ParamSFO paramSFO = new(s);
|
||||
if (json)
|
||||
{
|
||||
@@ -345,10 +343,10 @@ namespace IRDKit
|
||||
else
|
||||
paramSFO.Print(outPath);
|
||||
}
|
||||
catch
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
Console.WriteLine("PS3_GAME\\PARAM.SFO not found");
|
||||
}
|
||||
if (!json)
|
||||
Console.WriteLine("PS3_GAME\\PARAM.SFO not found. Not a valid PS3 ISO?");
|
||||
}
|
||||
|
||||
// End JSON object
|
||||
|
||||
Reference in New Issue
Block a user