From a90f98c9aca1b9fbbbd1444e5bdd69c9232d97d5 Mon Sep 17 00:00:00 2001 From: James Harper Date: Wed, 21 Apr 2010 16:47:10 +0200 Subject: [PATCH] Fix job_metadata name problem --- bacula/src/filed/backup.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/bacula/src/filed/backup.c b/bacula/src/filed/backup.c index 43b856a8b6..96e0be2db7 100644 --- a/bacula/src/filed/backup.c +++ b/bacula/src/filed/backup.c @@ -1339,13 +1339,16 @@ static void close_vss_backup_session(JCR *jcr) } } WCHAR *metadata = g_pVSSClient->GetMetadata(); - FF_PKT *ff_pkt = jcr->ff; - ff_pkt->fname = bstrdup("job_metadata.xml"); - ff_pkt->type = FT_RESTORE_FIRST; - ff_pkt->LinkFI = 0; - ff_pkt->object = (char *)metadata; - ff_pkt->object_len = (wcslen(metadata) + 1) * sizeof(WCHAR); - save_file(jcr, ff_pkt, true); + if (metatdata) { + FF_PKT *ff_pkt = jcr->ff; + ff_pkt->fname = "job"; + ff_pkt->type = FT_RESTORE_FIRST; + ff_pkt->LinkFI = 0; + ff_pkt->object_name = "job_metadata.xml"; + ff_pkt->object = (char *)metadata; + ff_pkt->object_len = (wcslen(metadata) + 1) * sizeof(WCHAR); + save_file(jcr, ff_pkt, true); + } } #endif } -- 2.39.5