chiark / gitweb /
safely.lisp: Fix RENAME to cope with nontrivial directory components.
[lisp] / safely.lisp
index 13671a4698df327efcfc59696ff305559e4ca991..69fceed1076160e62343a0b3a8e6b71e5176fefe 100644 (file)
@@ -112,7 +112,9 @@ (defun safely-open-output-stream (safe file &rest open-args)
 
 (declaim (inline rename))
 (defun rename (old new)
-  #-clisp (rename-file old new)
+  #-clisp (rename-file old
+                      (make-pathname :directory '(:relative)
+                                     :defaults new))
   #+clisp (posix:copy-file old new :method :rename))
 
 (defun delete-file-without-moaning (file)