 + *  Returns: 0 on failure
 + *           1 on success with the File record in FILE_DBR
 + */
-+int db_accurate_get_file_attributes_record(JCR *jcr, B_DB *mdb, char *fname, JobId_t backupid, FILE_DBR *fdbr)
++int db_accurate_get_file_attributes_record(JCR *jcr, B_DB *mdb, char *fname, 
++					   JobId_t backupid, FILE_DBR *fdbr)
 +{
 +   int stat=0;
 +   char ed1[50];

 
 /* Commands sent to File daemon */
 static char backupcmd[] = "backup\n";
@@ -97,6 +98,411 @@
 }
 
 /*

+            "JOIN Path     USING (PathId) "
+ "WHERE Path.Path='%s' "
+   "AND Filename.Name='%s' "
+   "AND BackupId=%s "
+   "ORDER BY FileId DESC LIMIT 1",
+	mdb->esc_path,
+	mdb->esc_name,
+	edit_int64(backupid, ed1));
+   
+   Dmsg1(2,"get_file %s\n", mdb->cmd);
+
+   if (QUERY_DB(jcr, mdb, mdb->cmd)) {
+      char ed1[30];
