diff --git a/rpcs3/Emu/Cell/lv2/sys_fs.cpp b/rpcs3/Emu/Cell/lv2/sys_fs.cpp index 771ff2e1a0..cf3e4a5043 100644 --- a/rpcs3/Emu/Cell/lv2/sys_fs.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_fs.cpp @@ -1071,7 +1071,7 @@ lv2_file::open_raw_result_t lv2_file::open_raw(const std::string& local_path, s3 return {CELL_ENOTDIR}; } - fmt::throw_exception("unknown error %s", error); + fmt::throw_exception("unknown error %s (local=%s)", error, local_path); } } } @@ -1784,11 +1784,17 @@ error_code sys_fs_stat(ppu_thread& ppu, vm::cptr path, vm::ptr return { CELL_ENOTDIR, path }; } - fmt::throw_exception("unknown error %s", error); + fmt::throw_exception("unknown error %s (local=%s)", error, local_path); } } } + if (ends_with_delim_dot_or_dotdot(vpath) && !info.is_directory) + { + // If ending with "/.", it must be a directory + return { CELL_ENOTDIR, path }; + } + lock.unlock(); ppu.check_state();