Opened 11 years ago

Closed 10 years ago

#522 closed defect (fixed)

Windows: Device component lost in pathname handling

Reported by: hans Owned by: gb
Priority: normal Milestone:
Component: Runtime (threads, GC) Version: 1.3
Keywords: Cc:

Description

? (pathname-device (make-pathname :host "blub" :device "h" :name "hello" :directory '(:absolute "a" "b") :type "txt"))
:UNSPECIFIC

This breaks wildcard DIRECTORY searches on drives other than CCL's default drive, presumably C:. I have spent some time trying to find the problem myself, but got lost in the innards of the pathname handling code that I don't understand.

Change History (3)

comment:1 Changed 11 years ago by gb

  • Component changed from Infrastructure and Support to Runtime (threads, GC)
  • Status changed from new to assigned

? (pathname-device (make-pathname :device "h" :name "hello" :directory '(:absolute "a" "b") :type "txt")) ; no HOST argument specified in MAKE-PATHNAME call "h"

As I read the spec (the dictionary entry for MAKE-PATHNAME), the :HOST argument (if provided) must be a "valid physical pathname host", which is something recognized by the implementation as denoting the name of a host. CCL does not recognize anything as denoting the name of a (physical) host on any platform; MAKE-PATHNAME should not interpret a specified :HOST component as being an undefined logical pathname host, which is what it's doing; it probably makes more sense to signal an error.

Whether or not it's necessary or desirable to support the concept of physical pathname hosts to support Windows's networking model is unclear for many reasons. It may be possible to avoid the issue by doing something like an NFS "mount" of a remote filesystem on a local drive/device; in XP, this can be done via the "Map network drive ..." option on the Tools menu in Windows Exploder.

comment:2 Changed 11 years ago by hans

I used the make-pathname example merely to illustrate that the device is lost. The problem that I originally came from was that I tried to wildcard expand something like #P"h:/foo/**/*.asd". CCL crashed with a message telling me that some file #P"/foo/blah/baz.asd" was not found, i.e. it lost the device name while processing the pathname. I thought that the make-pathname example was the reproducing the original problem.

Here is some more info and a stack backtrace. This is with "Version 1.3-dev-r12165-trunk (WindowsX8632)"

? (directory "h:/bknr-svn/thirdparty/asdf/**/*.lisp")
> Error: File #P"/bknr-svn/thirdparty/asdf/asdf-install.lisp" does not exist.
> While executing: CCL::%ALL-DIRECTORIES, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > :b
 (1160CBC) : 0 (%ALL-DIRECTORIES "/bknr-svn/thirdparty/asdf/" "/" #P"h:/bknr-svn/thirdparty/asdf/**/*.lisp" ("asdf" "thirdparty" "bknr-svn" :ABSOLUTE) (:DIRECTORIES NIL :FILES T :ALL ...)) 2839
 (1160D30) : 1 (DIRECTORY "h:/bknr-svn/thirdparty/asdf/**/*.lisp" :DIRECTORIES NIL :FILES T :ALL T :DIRECTORY-PATHNAMES T :INCLUDE-EMACS-LOCKFILES NIL :TEST NIL :FOLLOW-LINKS T) 575
 (1160D8C) : 2 (CALL-CHECK-REGS DIRECTORY "h:/bknr-svn/thirdparty/asdf/**/*.lisp") 247
 (1160DA8) : 3 (TOPLEVEL-EVAL (DIRECTORY "h:/bknr-svn/thirdparty/asdf/**/*.lisp") NIL) 751
 (1160DE8) : 4 (READ-LOOP :INPUT-STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #x89DDB36> :OUTPUT-STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #x89DD936> :BREAK-LEVEL 0 :PROMPT-FUNCTION #<Compiled-function (:INTERNAL CCL::READ-LOOP) (Non-Global)  #x837484E>) 1815
 (1160EFC) : 5 (TOPLEVEL-LOOP) 71
 (1160F04) : 6 (FUNCALL #'#<(:INTERNAL (TOPLEVEL-FUNCTION (CCL::LISP-DEVELOPMENT-SYSTEM T)))>) 95
 (1160F14) : 7 (FUNCALL #'#<(:INTERNAL CCL::MAKE-MCL-LISTENER-PROCESS)>) 583
 (1160F60) : 8 (RUN-PROCESS-INITIAL-FORM #<TTY-LISTENER listener(1) [Active] #x89DBAFE> (#<COMPILED-LEXICAL-CLOSURE # #x89DB62E>)) 671
 (1160FA4) : 9 (FUNCALL #'#<(:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (PROCESS)))> #<TTY-LISTENER listener(1) [Active] #x89DBAFE> (#<COMPILED-LEXICAL-CLOSURE # #x89DB62E>)) 335
 (1160FCC) : 10 (FUNCALL #'#<(:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 279

comment:3 Changed 10 years ago by rme

  • Resolution set to fixed
  • Status changed from assigned to closed

This should work in the trunk as of r12431 (which is just a small addition to catch a case r11996 overlooked).

Note: See TracTickets for help on using tickets.