jcr->JobErrors++;
return 1;
}
+ case FT_DELETED:
+ Dmsg1(130, "FT_DELETED: %s\n", ff_pkt->fname);
+ break;
default:
Jmsg(jcr, M_NOTSAVED, 0, _(" Unknown file type %d; not saved: %s\n"),
ff_pkt->type, ff_pkt->fname);
set_portable_backup(&ff_pkt->bfd); /* disable Win32 BackupRead() */
}
- if (ff_pkt->cmd_plugin && !ff_pkt->no_read) {
+ if (ff_pkt->cmd_plugin) {
do_plugin_set = true;
/* option and cmd plugin are not compatible together */
if (IS_FT_OBJECT(ff_pkt->type)) {
goto good_rtn;
}
-
+ /** Meta data only for deleted files */
+ if (ff_pkt->type == FT_DELETED) {
+ goto good_rtn;
+ }
/** Set up the encryption context and send the session data to the SD */
if (has_file_data && jcr->crypto.pki_encrypt) {
if (!crypto_session_send(jcr, sd)) {
do_read = true;
}
- if (ff_pkt->cmd_plugin) {
+ if (ff_pkt->cmd_plugin && !ff_pkt->no_read) {
do_read = true;
}
#ifdef HAVE_LZO
/** Do compression if turned on */
if (ff_pkt->flags & FO_COMPRESS && ff_pkt->Compress_algo == COMPRESS_LZO1X && jcr->LZO_compress_workset) {
+ lzo_uint len; /* TODO: See with the latest patch how to handle lzo_uint with 64bit */
+
ser_declare;
ser_begin(cbuf, sizeof(comp_stream_header));
Dmsg3(400, "cbuf=0x%x rbuf=0x%x len=%u\n", cbuf, rbuf, sd->msglen);
- lzores = lzo1x_1_compress((const unsigned char*)rbuf, sd->msglen, cbuf2, &compress_len, jcr->LZO_compress_workset);
+ lzores = lzo1x_1_compress((const unsigned char*)rbuf, sd->msglen, cbuf2,
+ &len, jcr->LZO_compress_workset);
+ compress_len = len;
if (lzores == LZO_E_OK && compress_len <= max_compress_len)
{
/* complete header */
* For a directory, link is the same as fname, but with trailing
* slash. For a linked file, link is the link.
*/
- if (ff_pkt->type != FT_DELETED) { /* already stripped */
+ if (!IS_FT_OBJECT(ff_pkt->type) && ff_pkt->type != FT_DELETED) { /* already stripped */
strip_path(ff_pkt);
}
switch (ff_pkt->type) {
attribsEx, 0, ff_pkt->delta_seq, 0);
break;
}
- if (ff_pkt->type != FT_DELETED) {
+
+ if (!IS_FT_OBJECT(ff_pkt->type) && ff_pkt->type != FT_DELETED) {
unstrip_path(ff_pkt);
}
while (*in && !IsPathSeparator(*in)) {
out++; in++;
}
- out++; in++;
- numsep++; /* one separator seen */
+ if (*in) { /* Not at the end of the string */
+ out++; in++;
+ numsep++; /* one separator seen */
+ }
for (stripped=0; stripped<count && *in; stripped++) {
while (*in && !IsPathSeparator(*in)) {
in++; /* skip chars */
Jmsg(jcr, msg_type, 0, _("VSS Writer (BackupComplete): %s\n"), g_pVSSClient->GetWriterInfo(i));
}
}
+ /* Generate Job global writer metadata */
WCHAR *metadata = g_pVSSClient->GetMetadata();
if (metadata) {
FF_PKT *ff_pkt = jcr->ff;
- ff_pkt->fname = (char *)"job";
+ ff_pkt->fname = (char *)"*all*"; /* for all plugins */
ff_pkt->type = FT_RESTORE_FIRST;
ff_pkt->LinkFI = 0;
ff_pkt->object_name = (char *)"job_metadata.xml";