$ git clone https://socialnetwork.ion.nu/socialnetwork.git
commit 6d4c826cf5a63629e9384fb16b990e4174715bb9
Author: Alicia <...>
Date:   Sun Jan 22 19:06:36 2017 +0100

    peer_exportpeers(): don't write empty peer lists (especially in case it would overwrite a non-empty list)

diff --git a/peer.c b/peer.c
index f356207..f318054 100644
--- a/peer.c
+++ b/peer.c
@@ -506,6 +506,7 @@ struct peer* peer_findbyid(const unsigned char id[20])
 
 void peer_exportpeers(const char* path)
 {
+  if(!peercount){return;}
   int f=open(path, O_WRONLY|O_CREAT|O_TRUNC, 0644);
   unsigned int i;
   for(i=0; i<peercount; ++i)