From 0c44a68572089d61cf6c7dd07a2ac724b35a112e Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Sun, 23 Aug 2009 09:09:52 +0000 Subject: [PATCH] 1.0.30.49: delete-file behaviour reversal In the 1.0.29.x series, DELETE-FILE started deleting the truename of the given pathname designator (rather than the pathname itself), meaning that symlinks could no longer be deleted. Revert back to the historical behaviour. (Noted on sbcl-devel by Luis Oliveira 2009-08-18.) Although the behaviour hasn't changed recently, there's a similar issue in RENAME-FILE, but that operator has such bizarre behaviour anyway it might be worth just letting sleeping pathname functions lie. --- NEWS | 3 +++ src/code/filesys.lisp | 5 +++-- version.lisp-expr | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index ba67a50..e7a2356 100644 --- a/NEWS +++ b/NEWS @@ -65,6 +65,9 @@ changes relative to sbcl-1.0.30: * bug fix: DELETE-FILE on streams no longer closes the stream with :ABORT T, leading to possible attempts to delete the same file twice. See docstring on DELETE-FILE for details. (reported by John Fremlin) + * bug fix: DELETE-FILE once again deletes the file named by the pathname + designator argument, rather than its truename. (reported by Luis + Oliveira) * bug fix: the low-level debugger had 32-bit assumptions and was missing information about some array types. (thanks to Luis Oliveira) * bug fix: moderately complex combinations of inline expansions could diff --git a/src/code/filesys.lisp b/src/code/filesys.lisp index 0cac4e7..e5bda9e 100644 --- a/src/code/filesys.lisp +++ b/src/code/filesys.lisp @@ -477,8 +477,9 @@ If FILE is a stream, on Windows the stream is closed immediately. On Unix plaforms the stream remains open, allowing IO to continue: the OS resources associated with the deleted file remain available till the stream is closed as per standard Unix unlink() behaviour." - (let* ((truename (truename file)) - (namestring (native-namestring truename :as-file t))) + (let* ((pathname (pathname file)) + (namestring (native-namestring pathname :as-file t))) + (truename file) ; for error-checking side-effect #!+win32 (when (streamp file) (close file)) diff --git a/version.lisp-expr b/version.lisp-expr index e1d7ac4..cdf2404 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.30.48" +"1.0.30.49" -- 1.7.10.4