[Ecls-list] a bug (or feature?) in (directory) implementation

Dima Pasechnik dimpase+ecl at gmail.com
Thu Mar 15 10:46:33 UTC 2012


This was posted on sage-devel:
https://groups.google.com/d/msg/sage-devel/M1gJh3lwhN0/G04AygcbreUJ

Below I cut the relevant part, which appears to demonstrate a problem
in calls like
(directory '/A/B/C/*')
 which boils down to the fact that is the top part (say '/A/B/') of
the path contains
an unreadable to the user directory, then the (directory '/A/B/C/*')
returns NIL,
even though it's perfectly readable to the user (tested on 11.1.1 and
on 12.**, too)

-----------------------------------------------------------------------
The problem is that my home directory is:

/files3/home/sahosse/

but I only have execution permission to the directory "home":

[sahosse at msx0 ~]$ ls -ld /files3/home
drwx--x--x 192 root msstaff 4096 Feb 15 13:23 /files3/home
[sahosse at msx0 ~]$ ls -l /files3/home
ls: /files3/home: Permission denied

Off course I have access to my home directory but (directory) function
of ecl always return NIL as long as "home" appears in the path of the
requested directory, which means it fails on my entire home directory:

[sahosse at msx0 ~]$ ~/sage/local/bin/ecl
ECL (Embeddable Common-Lisp) 11.1.1 (git:UNKNOWN)
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.
Top level.
> (directory "/*")

(#P"/.autorelabel" #P"/.autofsck" #P"/.rnd")
> (directory "/files3/*")

NIL
> (directory "/files3/home/sahosse/*")

NIL

--------------
Best,
Dima




More information about the ecl-devel mailing list