[asdf-devel] ASDF from git and lispworks Personal Edition on windows 7/Vista
Faré
fahree at gmail.com
Sat Jun 19 16:55:38 UTC 2010
> The latest ASDF doesn't work well on Windows Vista/7 and Lispworks.
> LispWorks regards pathnames such as #P"C:/a-dir//anotherdir" as illegal
> because of the double slashes in it.
>
> I could fix it but it's a really ugly kludge not worth sharing.
> Anyway, I could understand where the problem lies: asdf is creating
> pathnames where (pathname-directory some-path) contains empty
> strings. This happens for output fasl files, that ASDF is placing in
>
> %APPDATA%\common-lisp\<implementation-name>\C\\path\to\source\file
>
> - note the double \\ after the drive letter.
>
Does it work better if you redefine component-name-to-pathname-components
this way?
(defun component-name-to-pathname-components (s &optional force-directory)
"Splits the path string S, returning three values:
A flag that is either :absolute or :relative, indicating
how the rest of the values are to be interpreted.
A directory path --- a list of strings, suitable for
use with MAKE-PATHNAME when prepended with the flag
value.
A filename with type extension, possibly NIL in the
case of a directory pathname.
FORCE-DIRECTORY forces S to be interpreted as a directory
pathname \(third return value will be NIL, final component
of S will be treated as part of the directory path.
The intention of this function is to support structured component names,
e.g., \(:file \"foo/bar\"\), which will be unpacked to relative
pathnames."
(check-type s string)
(let* ((components (split-string s :separator "/"))
(last-comp (car (last components))))
(multiple-value-bind (relative components)
(if (equal (first components) "")
(if (equal (first-char s) #\/)
(values :absolute (cdr components))
(values :relative nil))
(values :relative components))
(setf components (remove "" components :test #'equal))
(cond
((equal last-comp "")
(values relative components nil)) ; "" already removed
(force-directory
(values relative components nil))
(t
(values relative (butlast components) last-comp))))))
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
A nazi deathcamp survivor defined truth as follows:
believing it does not increase your chance of dying.
More information about the asdf-devel
mailing list