chiark / gitweb /
www-cgi/ucgitarget.c: Use `error' to report unusual filesystem object.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 29 Jan 2013 23:49:38 +0000 (23:49 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 30 Jan 2013 00:42:09 +0000 (00:42 +0000)
There's nothing useful in `errno'.  Let's not end up saying `Success'
here.

www-cgi/ucgitarget.c

index eb5fdabaface49339b75ab43852341b84f5e9da4..4228951b2643ec08f21bb3dd33fde7fdd9fa000b 100644 (file)
@@ -94,7 +94,7 @@ int main(int argc, const char **argv) {
     if (scriptpath[scriptpathlen-1]=='~') error("bad char end");
     r= stat(scriptpath,&stab); if (r) syserror("stat script");
     if (S_ISREG(stab.st_mode)) break;
-    if (!S_ISDIR(stab.st_mode)) syserror("script not directory or file");
+    if (!S_ISDIR(stab.st_mode)) error("script not directory or file");
     lastslash= nextslash;
   }
   if (*nextslash) xsetenv("PATH_INFO",nextslash,1);