From: <sn...@us...> - 2013-07-30 08:21:08
|
Revision: 649 http://sourceforge.net/p/euslisp/code/649 Author: snozawa Date: 2013-07-30 08:20:57 +0000 (Tue, 30 Jul 2013) Log Message: ----------- check non-existent directory by dirp ;; I set the return value NIL because probe-file or l/process.l return NIL if you access non-existent directory Modified Paths: -------------- trunk/EusLisp/lisp/c/unixcall.c Modified: trunk/EusLisp/lisp/c/unixcall.c =================================================================== --- trunk/EusLisp/lisp/c/unixcall.c 2013-07-28 07:36:49 UTC (rev 648) +++ trunk/EusLisp/lisp/c/unixcall.c 2013-07-30 08:20:57 UTC (rev 649) @@ -1127,7 +1127,7 @@ ckarg2(0,1); if (n==1) s=get_string(argv[0]); else s=(byte *)"."; - dirp = opendir((char *)s); + if ( (dirp = opendir((char *)s)) == NULL ) return (NIL); while ( (direntp = readdir( dirp )) != NULL ){ str=direntp->d_name; if(flag) a=cons(ctx,makestring(str,strlen(str)),a); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |