From 07da8d5e36d55d1fca0c486d9fa10353fb90b657 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sun, 22 Oct 2023 10:05:45 +0200 Subject: [PATCH] cellPhotoDecodeFromFile: allow decoding files inside dev_hdd1 --- rpcs3/Emu/Cell/Modules/cellPhotoDecode.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellPhotoDecode.cpp b/rpcs3/Emu/Cell/Modules/cellPhotoDecode.cpp index 5ba46d0cb9..d83939bcff 100644 --- a/rpcs3/Emu/Cell/Modules/cellPhotoDecode.cpp +++ b/rpcs3/Emu/Cell/Modules/cellPhotoDecode.cpp @@ -144,15 +144,14 @@ error_code cellPhotoDecodeFromFile(vm::cptr srcHddDir, vm::cptr srcH const std::string vpath = fmt::format("%s/%s", srcHddDir.get_ptr(), srcHddFile.get_ptr()); const std::string path = vfs::get(vpath); - if (!vpath.starts_with("/dev_hdd0")) + if (!vpath.starts_with("/dev_hdd0") && !vpath.starts_with("/dev_hdd1")) { - cellPhotoDecode.error("Destination '%s' is not inside dev_hdd0", srcHddDir); + cellPhotoDecode.error("Source '%s' is not inside dev_hdd0 or dev_hdd1", vpath); return CELL_PHOTO_DECODE_ERROR_ACCESS_ERROR; // TODO: is this correct? } if (!fs::is_file(path)) { - // TODO: check if the dir is user accessible and can be written to cellPhotoDecode.error("Source '%s' is not a file (vfs='%s')", path, vpath); return CELL_PHOTO_DECODE_ERROR_ACCESS_ERROR; // TODO: is this correct? }