www-cgi/ucgitarget.c: Use `error' to report unusual filesystem object.
[userv-utils] / www-cgi / ucgitarget.c
index ebec06b..4228951 100644 (file)
@@ -3,7 +3,7 @@
  * environment variables are USERV_U_E_...
  */
 /*
- * Copyright (C) 1998-1999 Ian Jackson
+ * Copyright (C) 1998-1999,2003 Ian Jackson
  *
  * This is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by
@@ -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);