jcr->fn_printed = false;
bsnprintf(buf, sizeof(buf),
"SELECT Path.Path,Filename.Name FROM File,Path,Filename "
- "WHERE File.JobId=%d "
+ "WHERE File.JobId=%d AND File.FileIndex > 0 "
"AND File.MarkId!=%d AND File.PathId=Path.PathId "
"AND File.FilenameId=Filename.FilenameId",
JobId, jcr->JobId);
stat = bnet_fsend(dir, "%d %d %s %s%c%s%c%s%c", jcr->JobFiles,
STREAM_UNIX_ATTRIBUTES, "pinsug5", fname,
0, ap, 0, lname, 0);
+ /* for a deleted record, we set fileindex=0 */
+ } else if (type == FT_DELETED) {
+ stat = bnet_fsend(dir,"%d %d %s %s%c%s%c%c", 0,
+ STREAM_UNIX_ATTRIBUTES, "pinsug5", fname,
+ 0, ap, 0, 0);
} else {
stat = bnet_fsend(dir,"%d %d %s %s%c%s%c%c", jcr->JobFiles,
STREAM_UNIX_ATTRIBUTES, "pinsug5", fname,