From: James Harper Date: Wed, 21 Apr 2010 14:47:10 +0000 (+0200) Subject: Fix job_metadata name problem X-Git-Tag: Release-7.0.0~1900 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a90f98c9aca1b9fbbbd1444e5bdd69c9232d97d5;p=bacula%2Fbacula Fix job_metadata name problem --- 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 }