gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r32359 - gnunet/src/topology


From: gnunet
Subject: [GNUnet-SVN] r32359 - gnunet/src/topology
Date: Sun, 16 Feb 2014 16:22:58 +0100

Author: grothoff
Date: 2014-02-16 16:22:57 +0100 (Sun, 16 Feb 2014)
New Revision: 32359

Modified:
   gnunet/src/topology/friends.c
Log:
make sure to create friends directory before trying to write friends file

Modified: gnunet/src/topology/friends.c
===================================================================
--- gnunet/src/topology/friends.c       2014-02-16 15:20:29 UTC (rev 32358)
+++ gnunet/src/topology/friends.c       2014-02-16 15:22:57 UTC (rev 32359)
@@ -147,6 +147,14 @@
                               "topology", "FRIENDS");
     return NULL;
   }
+  if (GNUNET_OK !=
+      GNUNET_DISK_directory_create_for_file (fn))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                _("Directory for file `%s' does not seem to be writable.\n"),
+                fn);
+    return NULL;
+  }
   if (GNUNET_OK == GNUNET_DISK_file_test (fn))
     GNUNET_DISK_file_backup (fn);
   w = GNUNET_new (struct GNUNET_FRIENDS_Writer);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]