Hi all,
I found I needed to change two things to get the
search.pl script running on my win32 box.
- I needed to add a \: to the regexp group in the
detaint_dirname sub to allow the windows 'drive name'
to be valid (i.e. chdir to C:/perl/cgi-bin failed at
the end of the script). There may be a better way to
do this, since File::Find doesn't use it... but I
haven't
tracked it down yet.
L362: $dirname =~ m|^([-+@\:\w.]+)$| ...
- the open on L221 failed for filenames in paths below
the $basedir. If I remember correctly, matt's original
script didn't search subdirs anyway, so this is not
exactly a bug for exact compatibilty. But as long as
Find::File is searching the subdirectories anyway,
might as well report was is found.
So. I belive L221 should be changed to:
L221: open(FILE, "<$_") or do {print "couldn't open
file: $!<br>\n"; return };
BTW. very nice work on the nms-cgi project overall.
It fits a real need.
--Scott
Logged In: YES
user_id=313586
I think that this has now been addressed - would you like to
test it and get back. Thanks.