mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-03 07:10:08 +01:00
vfs: allow cross fs operations if both are host fw
This commit is contained in:
parent
87c0cd7dad
commit
c2f317b2fa
|
|
@ -253,9 +253,21 @@ orbis::ErrorCode vfs::createSymlink(std::string_view target,
|
|||
}
|
||||
|
||||
if (fromDevice != targetDevice) {
|
||||
std::fprintf(stderr, "cross fs operation: %s -> %s\n",
|
||||
std::string(target).c_str(), std::string(linkPath).c_str());
|
||||
std::abort();
|
||||
auto fromHost = fromDevice.cast<HostFsDevice>();
|
||||
auto targetHost = targetDevice.cast<HostFsDevice>();
|
||||
|
||||
if (fromHost == nullptr || targetHost == nullptr) {
|
||||
std::fprintf(stderr, "cross fs operation: %s -> %s\n",
|
||||
std::string(target).c_str(), std::string(linkPath).c_str());
|
||||
std::abort();
|
||||
}
|
||||
|
||||
std::error_code ec;
|
||||
std::filesystem::create_symlink(
|
||||
std::filesystem::absolute(fromHost->hostPath + "/" +
|
||||
fromDevPath.c_str()),
|
||||
targetHost->hostPath + "/" + toDevPath.c_str(), ec);
|
||||
return convertErrorCode(ec);
|
||||
}
|
||||
|
||||
return fromDevice->createSymlink(fromDevPath.c_str(), toDevPath.c_str(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue