From d52c1ee850d6bf3bc37740a9cf61574f7d223d3e Mon Sep 17 00:00:00 2001 From: Adubbz Date: Thu, 5 Mar 2020 23:07:52 +1100 Subject: [PATCH] fs: fixed incorrect mode check --- .../include/stratosphere/fs/fsa/fs_ifilesystem.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/libstratosphere/include/stratosphere/fs/fsa/fs_ifilesystem.hpp b/libraries/libstratosphere/include/stratosphere/fs/fsa/fs_ifilesystem.hpp index cc897523e..a1897ca8e 100644 --- a/libraries/libstratosphere/include/stratosphere/fs/fsa/fs_ifilesystem.hpp +++ b/libraries/libstratosphere/include/stratosphere/fs/fsa/fs_ifilesystem.hpp @@ -88,10 +88,10 @@ namespace ams::fs::fsa { } Result OpenDirectory(std::unique_ptr *out_dir, const char *path, OpenDirectoryMode mode) { - R_UNLESS(path != nullptr, fs::ResultInvalidPath()); - R_UNLESS(out_dir != nullptr, fs::ResultNullptrArgument()); - R_UNLESS((mode & OpenDirectoryMode_All) != 0, fs::ResultInvalidArgument()); - R_UNLESS((mode & ~OpenDirectoryMode_All) == 0, fs::ResultInvalidArgument()); + R_UNLESS(path != nullptr, fs::ResultInvalidPath()); + R_UNLESS(out_dir != nullptr, fs::ResultNullptrArgument()); + R_UNLESS((mode & OpenDirectoryMode_All) != 0, fs::ResultInvalidArgument()); + R_UNLESS((mode & ~(OpenDirectoryMode_All | OpenDirectoryMode_NotRequireFileSize)) == 0, fs::ResultInvalidArgument()); return this->OpenDirectoryImpl(out_dir, path, mode); }