/[cmucl]/src/code/pathname.lisp
ViewVC logotype

Diff of /src/code/pathname.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.73 by rtoy, Wed May 11 13:51:09 2005 UTC revision 1.74 by rtoy, Mon Sep 12 14:38:17 2005 UTC
# Line 724  a host-structure or string." Line 724  a host-structure or string."
724                       (warn "Silly argument for a unix ~A: ~S"                       (warn "Silly argument for a unix ~A: ~S"
725                             name-or-type name)))))))                             name-or-type name)))))))
726        (check-component-validity name :pathname-name)        (check-component-validity name :pathname-name)
727        (check-component-validity type :pathname-type))        (check-component-validity type :pathname-type)
728          (mapc #'(lambda (d)
729                    (check-component-validity d :directory))
730                (cdr dir)))
731    
732        ;; More sanity checking
733        (when dir
734          ;; Try to canonicalize the directory component.  :absolute
735          ;; followed by a bunch of "/" deletes the leading "/"'s.
736          ;; :relative followed by "."  anywhere gets them all deleted.
737          (ecase (first dir)
738            (:absolute
739             (do ((p (cdr dir) (cdr p)))
740                ((or (null p)
741                     (not (equal "/" (car p))))
742                 (setf (cdr dir) p))))
743            (:relative
744             (setf (cdr dir) (delete "." (cdr dir) :test #'equal)))))
745      ;; CLHS 19.2.2.4.3 says :absolute or :wild-inferiors immediately      ;; CLHS 19.2.2.4.3 says :absolute or :wild-inferiors immediately
746      ;; followed by :up or :back signals a file-error.      ;; followed by :up or :back signals a file-error.
747    

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.74

  ViewVC Help
Powered by ViewVC 1.1.5