From 5b2a85113ed7d7445ba96f5d5cecb3f9bfae2aa3 Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Wed, 16 Jan 2013 21:27:19 +0100 Subject: [PATCH] DELETE-FILES: avoid following symlinks by default, add a keyword argument to enable it --- src/os/os-unix.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/os-unix.lisp b/src/os/os-unix.lisp index 27f88c7..912cacb 100644 --- a/src/os/os-unix.lisp +++ b/src/os/os-unix.lisp @@ -533,7 +533,7 @@ the files and directories contained within. Returns T on success." (walk directory 0 nil) t))) -(defun delete-files (pathspec &key recursive) +(defun delete-files (pathspec &key recursive follow-symlinks) (labels ((%delete-file (file) (isys:unlink (file-path-namestring (absolute-file-path file)))) @@ -541,7 +541,7 @@ the files and directories contained within. Returns T on success." (isys:rmdir (file-path-namestring (absolute-file-path directory))))) (let* ((pathspec (file-path pathspec)) - (kind (file-kind pathspec :follow-symlinks t))) + (kind (file-kind pathspec :follow-symlinks follow-symlinks))) (case kind (:directory (if recursive -- 2.11.4.GIT