X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcode%2Fwin32-pathname.lisp;h=480877cf881e7a06de0b1263a5f45a5f308055c4;hb=fb76e3acd8b8a53cdadaa65bce1d090d99e004a0;hp=81ddebd5ca22d7eea249c84683adb5bc91fbeaa7;hpb=fb8e5ded0b56f50de2024efbcc9ce68b401415f5;p=sbcl.git diff --git a/src/code/win32-pathname.lisp b/src/code/win32-pathname.lisp index 81ddebd..480877c 100644 --- a/src/code/win32-pathname.lisp +++ b/src/code/win32-pathname.lisp @@ -109,7 +109,7 @@ for piece = (subseq namestring start end) collect (if (and (string= piece "..") rest) :up - piece))) + piece))) (name-and-type (let* ((end (first (last components))) (dot (position #\. end :from-end t))) @@ -273,7 +273,7 @@ (unless directory (go :done)) :subdir (let ((piece (pop directory))) - (typecase piece + (typecase piece ((member :up) (write-string ".." s)) (string (write-string piece s)) (t (error "ungood piece in NATIVE-NAMESTRING: ~S" piece))) @@ -307,7 +307,7 @@ (cond ((null pathname-directory) '(:relative)) ((eq (car pathname-directory) :relative) pathname-directory) - ((and (> prefix-len 1) + ((and (> prefix-len 0) (>= (length pathname-directory) prefix-len) (compare-component (subseq pathname-directory 0 prefix-len) @@ -410,7 +410,7 @@ (t (setf dots nil) (setf (schar dst dst-len) char) - (incf dst-len))))) + (incf dst-len))))) ;; ...finish off (when (and last-slash (not (zerop last-slash))) (case dots