From: Alain Spineux Date: Mon, 20 Apr 2020 13:52:09 +0000 (+0200) Subject: BEE Backport bacula/src/filed/verify.c X-Git-Tag: Release-11.3.2~1841 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa5fcf184b3e75fa5f62bcf3f2a17cab5add79ff;p=thirdparty%2Fbacula.git BEE Backport bacula/src/filed/verify.c This commit is the result of the squash of the following main commits: Author: Alain Spineux Date: Tue Aug 28 17:14:31 2018 +0200 snapshot: maintain both paths instead of stripping and unstripping - snap_fname is the path inside the snapshot used for "system" operation - fname is the path from the FileSet used for display and for SD or DIR "computation" - when snapshot is not in used, both are equal --- diff --git a/bacula/src/filed/verify.c b/bacula/src/filed/verify.c index ec491d8267..2cebcf4578 100644 --- a/bacula/src/filed/verify.c +++ b/bacula/src/filed/verify.c @@ -295,7 +295,7 @@ int digest_file(JCR *jcr, FF_PKT *ff_pkt, DIGEST *digest) if (ff_pkt->statp.st_size > 0 || ff_pkt->type == FT_RAW || ff_pkt->type == FT_FIFO) { int noatime = ff_pkt->flags & FO_NOATIME ? O_NOATIME : 0; - if ((bopen(&bfd, ff_pkt->fname, O_RDONLY | O_BINARY | noatime, 0)) < 0) { + if ((bopen(&bfd, ff_pkt->snap_fname, O_RDONLY | O_BINARY | noatime, 0)) < 0) { ff_pkt->ff_errno = errno; berrno be; be.set_errno(bfd.berrno); @@ -311,7 +311,7 @@ int digest_file(JCR *jcr, FF_PKT *ff_pkt, DIGEST *digest) #ifdef HAVE_DARWIN_OS /* Open resource fork if necessary */ if (ff_pkt->flags & FO_HFSPLUS && ff_pkt->hfsinfo.rsrclength > 0) { - if (bopen_rsrc(&bfd, ff_pkt->fname, O_RDONLY | O_BINARY, 0) < 0) { + if (bopen_rsrc(&bfd, ff_pkt->snap_fname, O_RDONLY | O_BINARY, 0) < 0) { ff_pkt->ff_errno = errno; berrno be; Jmsg(jcr, M_ERROR, -1, _(" Cannot open resource fork for %s: ERR=%s.\n"),