From a6c21db0e38db7eff90ebcd6c36b5aa549a45421 Mon Sep 17 00:00:00 2001 From: emmaus Date: Sun, 4 Nov 2018 20:57:40 +0000 Subject: [PATCH] add file check in fsp-srv:8 --- Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs b/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs index 5370183b44..9eabe2d91b 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs +++ b/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs @@ -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);