(in-package :sb-posix-internal)
+;;; some explanation may be necessary. The namestring "[foo]"
+;;; denotes a wild pathname. When there's a file on the disk whose
+;;; Unix name is "[foo]", the appropriate CL namestring for it is
+;;; "\\[foo]". So, don't call NAMESTRING, instead call a function
+;;; that gets us the Unix name
+
(define-designator filename c-string
- (pathname (namestring (translate-logical-pathname filename)))
+ (pathname
+ (sb-impl::unix-namestring (translate-logical-pathname filename) nil))
(string filename))
(define-designator file-descriptor (integer 32)
(sb-posix:rmdir dir)
(sb-posix:syscall-errno c))))
#.sb-posix::eacces)
+
+;;; see comment in filename's designator definition, in macros.lisp
+(deftest filename-designator.1
+ (progn
+ ;; we use run-program to bypass the wildcard quoting in the
+ ;; highlevel CL functions like OPEN
+ (sb-ext:run-program "touch"
+ (list
+ (format nil "~A/[foo].txt"
+ (namestring *test-directory*)))
+ :search t :wait t )
+ ;; if this test fails, it will probably be with
+ ;; "System call error 2 (No such file or directory)"
+ (let ((*default-pathname-defaults* *test-directory*))
+ (sb-posix:unlink (car (directory "*.txt")))))
+ 0)
+
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.5.11"
+"0.8.5.12"