small tweak

This commit is contained in:
2026-03-31 18:54:19 +02:00
parent 2a31dc838d
commit 9291d81d41

View File

@@ -851,6 +851,10 @@ static nn_Exit ncl_fsHandler(nn_FSRequest *req) {
nn_setError(C, "illegal copy operation"); nn_setError(C, "illegal copy operation");
return NN_EBADCALL; return NN_EBADCALL;
} }
// matches tmpfs behavior
if(ncl_exists(state->vfs, to)) {
ncl_removeRecursive(state->vfs, to);
}
bool ok = ncl_copyto(state->vfs, from, to); bool ok = ncl_copyto(state->vfs, from, to);
if(ok) { if(ok) {
ncl_removeRecursive(state->vfs, from); ncl_removeRecursive(state->vfs, from);