(iolib.os:file-exists-p (iolib.pathnames:file-path "doesnt-exist"))
results in:
Unknown file mode: 890000.. This seems to be a bug in IOlib. Please report it to iolib-devel@common-lisp.net [Condition of type IOLIB.BASE:IOLIB-BUG]
Restarts: 2: RETRY Retry SLIME REPL evaluation request. 1: *ABORT Return to SLIME's top level. 0: TERMINATE-THREAD Terminate this thread (#<THREAD "repl-thread" RUNNING {1006F86411}>)
Backtrace: 0: (IOLIB.BASE:BUG "Unknown file mode: ~A.") [:EXTERNAL] 1: (IOLIB.OS::GET-FILE-KIND #/p/"/home/alendvai/workspace/hu.dwim.wui/www/foo/bar" T) 2: (IOLIB.OS:FILE-EXISTS-P #/p/"/home/alendvai/workspace/hu.dwim.wui/www/foo/bar" NIL) 3: (SB-INT:SIMPLE-EVAL-IN-LEXENV (IOLIB.OS:FILE-EXISTS-P (IOLIB.PATHNAMES:MERGE-FILE-PATHS "foo/bar" (IOLIB.PATHNAMES:FILE-PATH #))) #<NULL-LEXENV>)
hth,
err, the same happens with a file that exists:
(iolib.os:file-exists-p (iolib.pathnames:file-path "/etc/hostname"))
this is on a recent Ubuntu x86_64:
Linux ed101 2.6.32-25-generic #44-Ubuntu SMP Fri Sep 17 20:05:27 UTC 2010 x86_64 GNU/Linux
more anomalies related to dirs and regular files:
TEST> (iolib.os:file-exists-p "/tmp") #/p/"/tmp" :REGULAR-FILE
i think it's because either the grovelled value of s-ifmt, or isys:s-ifreg is wrong:
(cl:defconstant s-ifmt 61440 "bitmask for type of entry") (cl:defconstant s-ifreg 32768 "regular file")
this should come from libfixposix? but it's not ported there yet?
when can i expect a fix for this? i've started to port the file serving code of hu.dwim.wui to iolib and now it's halfway stuck on this problem...
On Tue, 2010-10-05 at 01:44 +0200, Attila Lendvai wrote:
err, the same happens with a file that exists:
(iolib.os:file-exists-p (iolib.pathnames:file-path "/etc/hostname"))
this is on a recent Ubuntu x86_64:
Linux ed101 2.6.32-25-generic #44-Ubuntu SMP Fri Sep 17 20:05:27 UTC 2010 x86_64 GNU/Linux
more anomalies related to dirs and regular files:
TEST> (iolib.os:file-exists-p "/tmp") #/p/"/tmp" :REGULAR-FILE
i think it's because either the grovelled value of s-ifmt, or isys:s-ifreg is wrong:
(cl:defconstant s-ifmt 61440 "bitmask for type of entry") (cl:defconstant s-ifreg 32768 "regular file")
this should come from libfixposix? but it's not ported there yet?
when can i expect a fix for this? i've started to port the file serving code of hu.dwim.wui to iolib and now it's halfway stuck on this problem...
I confirm that I can reproduce the bug and I'll work on it as soon as possible. Until then, you could use the latest release