LRN: Fix automake deps to allow -j* builds again
[oweals/gnunet.git] / src / util / disk.c
index fd8e5a65462c149a59839ff6090a2e059c3b6939..b53b556e178535beeecbfdea7928ea885314a5ad 100644 (file)
@@ -352,7 +352,11 @@ GNUNET_DISK_mktemp (const char *t)
   char *fn;
 
   if ( (t[0] != '/') &&
-       (t[0] != '\\') )
+       (t[0] != '\\') 
+#if WINDOWS
+       && ! (isalpha ((int) t[0]) && (t[0] != '\0') && (t[1] == ':'))
+#endif
+       )
     {
       tmpdir = getenv ("TMPDIR");
       tmpdir = tmpdir ? tmpdir : "/tmp";
@@ -1049,6 +1053,7 @@ GNUNET_DISK_directory_remove (const char *fileName)
 
   if (0 != LSTAT (fileName, &istat))
     return GNUNET_NO;           /* file may not exist... */
+  CHMOD (fileName, S_IWUSR | S_IRUSR | S_IXUSR);
   if (UNLINK (fileName) == 0)
     return GNUNET_OK;
   if ((errno != EISDIR) &&