-fix time assertion introduce in last patch
[oweals/gnunet.git] / src / util / network.c
index d321a70094c7a2f569980eabfea16a822eca154f..46e6fa03b3cbdc0c5a9940074a84d03e5000bb3d 100644 (file)
@@ -505,7 +505,7 @@ GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc)
       while ((len > 0) && (dirname[len] != DIR_SEPARATOR))
         len--;
       dirname[len] = '\0';
-      if (0 != rmdir (dirname))
+      if ((0 != len) && (0 != rmdir (dirname)))
       {
         switch (errno)
         {