Changeset 8932


Ignore:
Timestamp:
Mar 29, 2008, 2:49:12 AM (11 years ago)
Author:
gz
Message:

Fix for bugs #263 and #238:

  • %unix-file-kind takes a native namestring, so don't try to nativize it.
  • file-namestring-from-parts on the other hand takes escaped strings, so don't try to re-escape them.
  • Add a comment in %path-std-quotes explaining the convention.
Location:
trunk/source
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-files.lisp

    r8816 r8932  
    396396              ((nil :unspecific) "")
    397397              (:wild "*")
    398               (t (%path-std-quotes name nil ".")))
     398              (t (%path-std-quotes name "*;:" ".")))
    399399            (if (or type version)
    400400              (%str-cat (case type
    401401                          ((nil) ".")
    402402                          (:wild ".*")
    403                           (t (%str-cat "." (%path-std-quotes type nil "."))))
     403                          (t (%str-cat "." (%path-std-quotes type "*;:" "."))))
    404404                        (case version
    405405                          ((nil) "")
     
    10061006
    10071007;Standardize pathname quoting, so can do EQUAL.
     1008;; Subtle point: when keep-quoted is NIL, arg is assumed native,
     1009;; and therefore escape characters are made quoted.
     1010;; if keep-quoted is not NIL, e.g. if it's "", arg is assumed
     1011;;   to be escaped already, so escape chars are interpreted as quotes.
    10081012;; Note that this can't be used to remove quotes because it
    10091013;; always keeps the escape character quoted.
  • trunk/source/level-1/linux-files.lisp

    r8587 r8932  
    334334            (t :special)))))
    335335
    336 (defun %unix-file-kind (path &optional check-for-link)
    337   (%file-kind (nth-value 1 (%stat (native-translated-namestring path) check-for-link))))
     336(defun %unix-file-kind (native-namestring &optional check-for-link)
     337  (%file-kind (nth-value 1 (%stat native-namestring check-for-link))))
    338338
    339339(defun %unix-fd-kind (fd)
  • trunk/source/lib/dumplisp.lisp

    r6971 r8932  
    5757                                     :directory (pathname-directory (translate-logical-pathname filename))))
    5858    (error "Directory containing ~s does not exist." filename))
    59   (let* ((kind (%unix-file-kind (namestring (translate-logical-pathname filename)))))
     59  (let* ((kind (%unix-file-kind (native-translated-namestring filename))))
    6060    (when (and kind (not (eq kind :file )))
    6161      (error "~S is not a regular file." filename)))
Note: See TracChangeset for help on using the changeset viewer.