Menu

#727 (directory "/etc/*/") - OS-FILE-ERROR(ENOENT)

lisp error
open
nobody
None
5
2018-01-29
2018-01-29
Don Cohen
No

below sent to clisp-list
Sam says to report it here
Note this is current source from hg

In my current build (on linux)
(directory "/etc/*/")
[../src/pathname.d:7223]
*** - OS-FILE-ERROR(ENOENT): No such file or directory

This is a bug, please report a self-contained case at
https://sourceforge.net/p/clisp/bugs/.

Discussion

  • Sam Steingold

    Sam Steingold - 2018-01-29

    This is not a reproducible test case - WFM.
    For us to be able to fix this, you need to figure out which entry in /etc/ causes the problem and re-create it from scratch in a new directory.
    e.g., the test case should look like this:
    bash$ mkdir test; cd test; ln ????; cp ??? ; whatever
    then in clisp (directory "test/*/") --> error.

     
  • Don Cohen

    Don Cohen - 2018-01-29

    It was not even clear to me that this was related to some particular entry in /etc.
    But with this hint I find the problem is a symbolic link that points to a file that does not exist.
    You think that the error is justified in this case?
    I don't. For instance, when I do directory of a directory that doesn't exist I get nil.
    However, this does lead to some interesting questions.
    If you just do directory with no full perhaps the links to non-existent files should be excluded on grounds that they have no truename?
    With :full I'd hope to still get them, but then perhaps full name etc should be nil?
    I'd hope there's SOME way to get these bad links in lisp, for instance if I just want to find the bad links there should be a way to do it, right?

     
    • Sam Steingold

      Sam Steingold - 2018-01-29

      :if-does-not-exist argument controls the behavior on non-existent files.

      the rest of your comment does not, alas, provide a reproducible test example as I requested.

       
  • Don Cohen

    Don Cohen - 2018-01-29

    Hmm. :if-does-not-exist :discard, which is supposed to be the default fails, whereas :keep works! So does :ignore.
    I don't understand the doc for ignore and discard - if discard is supposed to signal an error then what does it mean to discard the bad entries? If it signals then perhaps it shouldn't be the default. Or at least the error should be continuable. I also think it would useful to tell me what entry is the problem!

     
  • Don Cohen

    Don Cohen - 2018-01-29

    ok, here's a test case:
    mkdir /xxx
    ln -s /yyy /xxx
    (neither of these existed before)
    (directory "/xxx//" :if-does-not-exist :ignore)
    NIL
    Break 2 [27]> (directory "/xxx/
    /" :if-does-not-exist :discard)

    [../src/pathname.d:7224]
    *** - OS-FILE-ERROR(ENOENT): No such file or directory
    The following restarts are available:
    ABORT :R1 Abort debug loop
    ABORT :R2 Abort debug loop
    ABORT :R3 Abort main loop
    Break 3 [28]> (directory "/xxx/" :if-does-not-exist :discard)
    NIL
    Break 3 [28]> (directory "/xxx/
    " :if-does-not-exist :ignore)
    NIL
    Break 3 [28]>

    Perhaps the broken link is interpreted as a directory rather than a file?

     
  • Don Cohen

    Don Cohen - 2018-01-29

    BTW
    Break 3 [28]> (directory "/xxx/" :if-does-not-exist :keep :full t)
    (#P"/xxx/yyy")
    Break 3 [28]> (directory "/xxx/
    /" :if-does-not-exist :keep :full t)
    (#P"/xxx/yyy")
    Break 3 [28]>
    so it counts as both directory and file if it doesn't exist.
    And I now see that I can find my non-existing links from set-difference of keep and ignore.

    (also, btw, I have a hard time with this web interface cause it implements its own html editor in js.
    is there some way I can turn that off?)

     

Log in to post a comment.

MongoDB Logo MongoDB