[armedbear-devel] Spaces in pathnames (jar:file:/x/y/z/a space/...)

Theam Yong Chew senatorzergling at gmail.com
Mon Jun 6 20:46:53 UTC 2011


On 6/4/11, Mark Evenson <evenson at panix.com> wrote:
> On 6/4/11 6:43 AM, Theam Yong Chew wrote:

[…]

> To be clear I can
>
> a)  LOAD a fasl ("an *.abcl file") with a space in its pathname
>
> (load "/Users/evenson/work/abcl/bugs/foo bar.abcl")
> 	
> b)  LOAD a fasl from a jar file with a space in the jar pathname
>
> (load
> "jar:file:/Users/evenson/work/abcl/bugs/a%20space/foo%20bar.abcl!/foo._")
>
> what I can't do with the current trunk code is
>
> c)  Load a fasl with a space in its name from a jar
>
> ;;; FAILS
> (load "jar:file:/Users/evenson/work/abcl/bugs/xx.jar!/xx/foo bar.abcl")
>
> Can you verify that only the last case fails for you without your patch?
>   Can you provide additional examples of bad behavior?

[...]

> [#151]: http://trac.common-lisp.net/armedbear/ticket/151


Hi,

Sorry for the slow reply, I've been thinking about a good way to go
about this problem. test.lisp is my initial attempt at exposing all
possible space-in-path possibilities (probably not complete yet). It's
also not very systematic yet, but for now, I'm trying to find out
both cases that work and cases that don't.

In the following, I'm trying to compare the differences between an
older abcl and my single-line patched version. I'm sorry the test
indices are not too informative, as this is just a rough first try,
and I need to go to sleep soon (please double check test.lisp, I might
have been sloppy too).



"0.25.0-dev-svn-13229"

; Compiling /home/tyc20/lisp/abcl-space-in-pathname/foo.lisp ...
; Wrote /home/tyc20/lisp/abcl-space-in-pathname/foo.abcl (0.003 seconds)
; Compiling /home/tyc20/lisp/abcl-space-in-pathname/foo.lisp ...
; Wrote /tmp/foo.abcl (0.003 seconds)
; Compiling /home/tyc20/lisp/abcl-space-in-pathname/foo.lisp ...
; Wrote /tmp/foo bar.abcl (0.004 seconds)
4:  Failed to create URI from '/tmp/foo bar.abcl': Illegal character
in path at index 13: file:/tmp/foo bar.abcl
5:  File not found.
6:  File not found.
7:  File not found.
8:  File not found.
13:  Loadable FASL not found for
'jar:file:/tmp/a%20space/xx.jar!/foo.abcl' in
'jar:jar:file:/tmp/a%2520space/xx.jar!/foo.abcl!/foo._'
14:  Failed to create URI from '/tmp/a space/xx.jar': Illegal
character in path at index 11: file:/tmp/a space/xx.jar
15:  File not found.
16:  File not found.
17:  File not found.

Using my "one-line patch" to the above branch,

; Compiling /home/tyc20/lisp/abcl-space-in-pathname/foo.lisp ...
; Wrote /home/tyc20/lisp/abcl-space-in-pathname/foo.abcl (0.003 seconds)
; Compiling /home/tyc20/lisp/abcl-space-in-pathname/foo.lisp ...
; Wrote /tmp/foo.abcl (0.003 seconds)
; Compiling /home/tyc20/lisp/abcl-space-in-pathname/foo.lisp ...
; Wrote /tmp/foo bar.abcl (0.004 seconds)
3:  Failed to create URI from '/tmp/foo bar.abcl': Illegal character
in path at index 13: file:/tmp/foo bar.abcl
4:  Failed to create URI from '/tmp/foo bar.abcl': Illegal character
in path at index 13: file:/tmp/foo bar.abcl
5:  File not found.
6:  File not found.
7:  File not found.
8:  File not found.
14:  Failed to create URI from '/tmp/a space/xx.jar': Illegal
character in path at index 11: file:/tmp/a space/xx.jar
15:  File not found.
16:  File not found.
17:  File not found.



Hope this is a good starting point? I believe this can later be folded
into the unit tests?

Yong
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.lisp
Type: application/octet-stream
Size: 3612 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20110607/8eee4b42/attachment.obj>


More information about the armedbear-devel mailing list