mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
cellPhotoDecodeFromFile: allow decoding files inside dev_hdd1
This commit is contained in:
parent
f9d213650c
commit
07da8d5e36
@ -144,15 +144,14 @@ error_code cellPhotoDecodeFromFile(vm::cptr<char> srcHddDir, vm::cptr<char> 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?
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user