add file check in fsp-srv:8

This commit is contained in:
emmaus 2018-11-04 20:57:40 +00:00
parent cacac0ea6e
commit a6c21db0e3

View file

@ -83,6 +83,11 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
string FullPath = Context.Device.FileSystem.SwitchPathToSystemPath(SwitchPath);
if (!File.Exists(FullPath))
{
return MakeError(ErrorModule.Fs, FsErr.PathDoesNotExist);
}
FileStream FileStream = new FileStream(FullPath, FileMode.Open, FileAccess.Read);
string Extension = Path.GetExtension(FullPath);