From 9291d81d4163244595eaa089689709bc9bb700df Mon Sep 17 00:00:00 2001 From: IonutParau Date: Tue, 31 Mar 2026 18:54:19 +0200 Subject: [PATCH] small tweak --- src/ncomplib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ncomplib.c b/src/ncomplib.c index 98a78f2..efa0099 100644 --- a/src/ncomplib.c +++ b/src/ncomplib.c @@ -851,6 +851,10 @@ static nn_Exit ncl_fsHandler(nn_FSRequest *req) { nn_setError(C, "illegal copy operation"); 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); if(ok) { ncl_removeRecursive(state->vfs, from);