1.0.0.16: fix SB-POSIX:READDIR to work when built with largefile
[sbcl.git] / contrib / sb-posix / posix-tests.lisp
index 7cc725b..78b4754 100644 (file)
                         #'string<)
                   (sort (append '("." "..")
                                 (mapcar (lambda (p)
-                                          (enough-namestring p *current-directory*))
+                                          (let ((string (enough-namestring p *current-directory*)))
+                                            (if (pathname-name p)
+                                                string
+                                                (subseq string 0 (1- (length string))))))
                                         (directory (make-pathname
                                                     :name :wild
                                                     :type :wild
                                                     :defaults *current-directory*))))
-                        #'string<)) 
+                        #'string<))
         (sb-posix:closedir dir)))
   t)