+ closedir (prootdir);
+
+ /* check temp directory */
+ VERBOSE (DEBUG, PRINT ("Check temp dirweb root\n"));
+ DIR *ptempdir = opendir (temp);
+ if (ptempdir == NULL) {
+ VERBOSE (ERROR, PERROR ("Can't read directory (%s)\n", temp));
+ return 1;
+ }
+ char *ntemp = tempname (temp, NULL);
+ FILE *ftemp = fopen (ntemp, "w");
+ if (ftemp == NULL) {
+ VERBOSE (ERROR, PERROR ("Can't write temporary file (%s)\n", ntemp));
+ return 1;
+ }
+ fclose (ftemp);
+ unlink (ntemp);
+ free (ntemp);