diff --git a/uiop/filesystem.lisp b/uiop/filesystem.lisp index 555e7503ff7a9fb3fe8075e0df3bb6126c2afbbe..a7b634410dc83dc598fb31c3ac78b592faf46fd8 100644 --- a/uiop/filesystem.lisp +++ b/uiop/filesystem.lisp @@ -521,8 +521,9 @@ as per native OS" (defun rename-file-overwriting-target (source target) "Rename a file, overwriting any previous file with the TARGET name, in an atomic way if the implementation allows." - #+clisp ;; But for a bug in CLISP 2.48, we should use :if-exists :overwrite and be atomic - (posix:copy-file source target :method :rename) + #+clisp ;; in recent enough versions of CLISP, :if-exists :overwrite would make it atomic + (progn (funcall 'require "syscalls") + (symbol-call :posix :copy-file source target :method :rename)) #-clisp (rename-file source target #+clozure :if-exists #+clozure :rename-and-delete))