Opened 11 years ago

Closed 11 years ago

#521 closed defect (invalid)

DIRECTORY does not work with pathnames containing multiple dots on Windows

Reported by: hans Owned by: gb
Priority: normal Milestone:
Component: project hosting Version: 1.3
Keywords: Cc:


Welcome to Clozure Common Lisp Version 1.3-dev-r12165-trunk (WindowsX8632)! neo-angin 103_> touch neo-angin 104_> h:/ccl/wx86cl -n -e '(print (directory "c:/cygwin/tmp/**/*.bar")))' (#P"C:/cygwin/tmp/x/" #P"C:/cygwin/tmp/x/foo'")

Notice the second pathname, which contains a quote character for no valid reason.

Change History (1)

comment:1 Changed 11 years ago by gb

  • Resolution set to invalid
  • Status changed from new to closed

The pathname contains a quote intentionally. On a Unix system:

[~] gb@antinomial> mkdir example
[~] gb@antinomial> touch example/a.b.c
[~] gb@antinomial> ccl
Welcome to Clozure Common Lisp Version 1.3-dev-r12117M-trunk  (DarwinX8632)!
? (directory "example/*.*")
;;; Do functions like OPEN understand the escaping conventions that the 
;;; implementation may use ? 
? (with-open-file (f (car *)) (file-length f))
;;; Apparently.  

This is analogous, only on Windows a single quote is used instead of a backslash to quote or escape characters that might otherwise have significance to the (implementation-dependent) code which parses physical pathname namestrings.

It's not clear that this escaping is tremendously useful (it may aid in round-tripping between namestrings and pathnames in some cases but certainly doesn't solve all such problems) and it seems to confuse people who think that CL pathnames are something that they aren't. It's entirely possible that the escaping of (potential) metacharacters is more trouble than it's worth, but I'm not aware of any bug here.

Note: See TracTickets for help on using tickets.