     Dmsg2(300, ">stored: attr len=%d: %s\n", sd->msglen, sd->msg);
     if (!stat) {
        Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
-@@ -1121,6 +1244,58 @@
+@@ -1121,6 +1245,58 @@
     return true;
  }
  
-+static bool encode_and_send_deleted_files(JCR *jcr, char *fname) 
++static bool encode_and_send_deleted_file(JCR *jcr, char *fname) 
 +{
 +   BSOCK *sd = jcr->store_bsock;
 +   char *attribs;

+   char ed1[50], ed2[50];
+
+   bsnprintf(buf, sizeof(buf),
+      "SELECT Path.Path,Filename.Name "
+        "FROM CurrentFile "
+             "JOIN File USING (FileId) "

+   db_sql_query(jcr->db, buf, accurate_handler, (void *)jcr);
+   jcr->file_bsock->signal(BNET_EOD);
+   
+   return 1;
+}
+
