mirror of https://github.com/PCSX2/pcsx2.git
GsDumpFinder: fix error when dir not found
This commit is contained in:
parent
b19804190e
commit
ba2efec983
|
@ -38,7 +38,17 @@ namespace GSDumpGUI.Forms.Helper
|
||||||
|
|
||||||
public IEnumerable<GsDumpFile> GetValidGsdxDumps(DirectoryInfo directory)
|
public IEnumerable<GsDumpFile> GetValidGsdxDumps(DirectoryInfo directory)
|
||||||
{
|
{
|
||||||
var dumps = directory.GetFiles("*.gs", SearchOption.TopDirectoryOnly);
|
var dumps = new FileInfo[0];
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
dumps = directory.GetFiles("*.gs", SearchOption.TopDirectoryOnly);
|
||||||
|
}
|
||||||
|
catch (DirectoryNotFoundException)
|
||||||
|
{
|
||||||
|
_logger.Warning($"Failed to open folder '{directory}'.");
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var dump in dumps)
|
foreach (var dump in dumps)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue