Report NAND move destination conflicts correctly

This commit is contained in:
patchzyy
2026-09-07 23:03:41 +02:00
parent afb8f49866
commit 05d6a0b1ab
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -384,6 +384,10 @@ extern "C" int32_t NANDMove_HLE(uint32_t srcPathPtr, uint32_t dstPathPtr) {
return NAND_RESULT_OK;
}
if (ec == std::errc::file_exists) {
return NAND_RESULT_EXISTS;
}
LogNandError("NANDMove", "FAILED error=%d message='%s'", ec.value(), ec.message().c_str());
return NAND_RESULT_UNKNOWN;
}
+2
View File
@@ -6,5 +6,7 @@
// Move without replacing an existing entry. Cross-filesystem regular files are
// staged at the destination before removing the source. On failure the source
// remains; a failed source removal can leave both complete copies.
// The caller must keep the source stable for the duration of the move; NAND HLE
// calls run synchronously on the cooperative guest thread without yielding.
void NandMove(const std::filesystem::path& source, const std::filesystem::path& destination,
std::error_code& ec);