Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#548 Problems with wild-inferiors in DIRECTORY :FULL T

lisp error
closed-fixed
Sam Steingold
clisp (525)
5
2010-06-01
2010-06-01
edgar-rft
No

CLISP 2.48+ CVS HEAD (2010, May 31) on Debian Lenny
Linux 2.6.26-2-686
gcc (Debian 4.3.2-1.1) 4.3.2
glibc 2.7-18lenny2

Problems with wild-inferiors in DIRECTORY :FULL T

The following problems only appear if a wild-inferiors ** sign
is contained in the pathname together with :FULL T, exactly the
same effects happen with namestrings.

Example:

A very simple directory tree, containing no links:

default-directory -/- test -/- dir-1 --/- dir-1-1
| file-1 | file-1-1
| |
| /- dir-1-2
| file-1-2
|
/- dir-2 --/- dir-2-1
file-2 | file-2-1
|
/- dir-2-2
file-2-2

1. With directory-forms (pathname ends with a slash)

This works correctly:

[1]> (directory #p"test/**/")
(#P"/home/edgar/test/dir-2/dir-2-2/"
#P"/home/edgar/test/dir-2/dir-2-1/"
#P"/home/edgar/test/dir-2/"
#P"/home/edgar/test/dir-1/dir-1-1/"
#P"/home/edgar/test/dir-1/dir-1-2/"
#P"/home/edgar/test/dir-1/"
#P"/home/edgar/test/")

But here the :FULL T is completely igored:

[2]> (directory #p"test/**/" :full t)
(#P"/home/edgar/test/dir-2/dir-2-2/"
#P"/home/edgar/test/dir-2/dir-2-1/"
#P"/home/edgar/test/dir-2/"
#P"/home/edgar/test/dir-1/dir-1-1/"
#P"/home/edgar/test/dir-1/dir-1-2/"
#P"/home/edgar/test/dir-1/"
#P"/home/edgar/test/")

2. With file-forms (pathname does not end with slash):

This works correctly:

[3]> (directory #p"test/**/*")
(#P"/home/edgar/test/dir-2/dir-2-2/file-2-2"
#P"/home/edgar/test/dir-2/dir-2-1/file-2-1"
#P"/home/edgar/test/dir-2/file-2"
#P"/home/edgar/test/dir-1/dir-1-1/file-1-1"
#P"/home/edgar/test/dir-1/dir-1-2/file-1-2"
#P"/home/edgar/test/dir-1/file-1")

But with :FULL T only a part of the tree is returned:

[4]> (directory #p"test/**/*" :full t)
(#P"/home/edgar/test/dir-1/dir-1-1/file-1-1"
#P"/home/edgar/test/dir-1/dir-1-1/file-1-1"
(33 39 18 31 5 2010)
0)
(#P"/home/edgar/test/dir-1/dir-1-2/file-1-2"
#P"/home/edgar/test/dir-1/dir-1-2/file-1-2"
(46 39 18 31 5 2010)
0)
(#P"/home/edgar/test/dir-1/file-1"
#P"/home/edgar/test/dir-1/file-1"
(11 39 18 31 5 2010)
0))

Discussion

  • Sam Steingold
    Sam Steingold
    2010-06-01

    thank you for your bug report.
    the bug has been fixed in the CVS tree.
    you can either wait for the next release (recommended)
    or check out the current CVS tree (see http://clisp.cons.org\)
    and build CLISP from the sources (be advised that between
    releases the CVS tree is very unstable and may not even build
    on your platform).

     
  • Sam Steingold
    Sam Steingold
    2010-06-01

    • labels: --> clisp
    • milestone: --> lisp error
    • assigned_to: nobody --> sds
    • status: open --> closed-fixed