[ic] Usertag/opendir don't work
Kevin Walsh
kevin at cursor.biz
Tue Sep 23 17:00:53 EDT 2003
Juergen R. Plasser [plasser at hexagon.at] wrote:
>
> I want to list some image files in a specific directory and select at
> random. It seems that interchange has some problems with opendir:
>
> This peace of code (in catalog.cfg, always restarted interchange after
> changes made) does not work (it is just for testing purposes):
>
> UserTag people_test Routine <<EOF
> sub {
> opendir(DH, "/var/www/html/expert_images/_img");
> closedir(DH);
> return "Test";
> }
> EOF
>
That sort of thing belongs as a global UserTag, so that it can be
called as [people-test] without being constrained by the Safe module.
You could SafeUntrap the various Opcodes associated with directory
open/close/read etc., although I strongly suggest that you use a
global UserTag instead.
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin at cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/
More information about the interchange-users
mailing list