From: SourceForge.net <no...@so...> - 2011-12-31 02:52:51
|
Bugs item #3467762, was opened at 2011-12-30 18:52 Message generated for change (Tracker Item Submitted) made by gabalz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=3467762&group_id=1355 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: clisp Group: lisp error Status: Open Resolution: None Priority: 5 Private: No Submitted By: Gabor Balazs (gabalz) Assigned to: Bruno Haible (haible) Summary: delete-file cannot delete directory symlink Initial Comment: The delete-file function can remove file and dead symlinks but not (alive) directory symlinks, because it always resolves the provided pathname in the directory symlink case even if it should not (according to the CLISP documentation) : "(DELETE-FILE pathname) deletes the pathname PATHNAME, not its TRUENAME, ..." Problem reconstruction: ~~~~~~~~~~~~~~~~~~ ls -lR drwxr-xr-x 2 bege users 4096 Dec 30 19:40 dir -rw-r--r-- 1 bege users 0 Dec 30 19:26 file lrwxrwxrwx 1 bege users 4 Dec 30 19:26 link-dead -> dead/ lrwxrwxrwx 1 bege users 3 Dec 30 19:26 link-dir -> dir lrwxrwxrwx 1 bege users 4 Dec 30 19:26 link-file -> file ./dir: -rw-r--r-- 1 bege users 0 Dec 30 19:40 dir-file Then (delete-file "dir") *** - DELETE-FILE: "/home/bege/TEST/dir" names a directory, not a file so the provided pathname is resolved. However, (delete-file "link-file") deletes the link-file link (properly), so in this case the provided pathname is not resolved. (delete-file "link-dead") works properly too without resolving the dead symlink. Desired behaviour: ~~~~~~~~~~~~~~ delete-file should not resolve the pathname for a directory symlink and should delete the symlink without error. Version ~~~~~~ clisp --version GNU CLISP 2.49 (2010-07-07) (built 3529014440) (memory 3529014964) Software: GNU C 4.5.3 gcc -O2 -march=core2 -fomit-frame-pointer -pipe -Wa,--noexecstack -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O -falign-functions=4 -pthread -DENABLE_UNICODE -DMULTITHREAD -DPOSIX_THREADS -DDYNAMIC_FFI -I. -Wl,-O1 -Wl,--as-needed /usr/lib64/libreadline.so -lncurses -ldl /usr/lib64/libavcall.a /usr/lib64/libcallback.a -L/usr/lib64 -lsigsegv -L/usr/lib64 -lc libgnu_cl.a SAFETY=0 TYPECODES WIDE_HARD GENERATIONAL_GC SPVW_BLOCKS SPVW_MIXED TRIVIALMAP_MEMORY libsigsegv 2.8 libreadline 6.2 Features: (READLINE REGEXP SYSCALLS I18N LOOP COMPILER CLOS MOP CLISP ANSI-CL COMMON-LISP LISP=CL INTERPRETER MT SOCKETS GENERIC-STREAMS LOGICAL-PATHNAMES SCREEN FFI GETTEXT UNICODE BASE-CHAR=CHARACTER WORD-SIZE=64 PC386 UNIX) C Modules: (clisp i18n syscalls regexp readline) Installation directory: /usr/lib64/clisp-2.49/ User language: ENGLISH Machine: X86_64 (X86_64) localhost [127.0.0.1] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=3467762&group_id=1355 |