- binit(&rsrc_bfd); /* we check if this is open below */
-#ifdef HAVE_DARWIN_OS
- /* Open resource fork if necessary */
- if (ff_pkt->type != FT_LNKSAVED && (S_ISREG(ff_pkt->statp.st_mode) &&
- ff_pkt->flags & FO_HFSPLUS)) {
- /* Remember Finder Info, whether we have data or fork, or not */
- hfsplus = true;
- if (ff_pkt->hfsinfo.rsrclength > 0) {
- if (bopen_rsrc(&rsrc_bfd, ff_pkt->fname, O_RDONLY | O_BINARY, 0) < 0) {
- ff_pkt->ff_errno = errno;
- berrno be;
- Jmsg(jcr, M_NOTSAVED, -1, _(" Cannot open resource fork for %s: ERR=%s\n"),
- ff_pkt->fname, be.strerror());
- jcr->Errors++;
- if (is_bopen(&ff_pkt->bfd)) {
- bclose(&ff_pkt->bfd);
- }
- return 1;
- }
- }
- }
-#endif
-
- encode_stat(attribs, ff_pkt, 0);
-
- /* Now possibly extend the attributes */
- encode_attribsEx(jcr, attribsEx, ff_pkt);
-
- P(jcr->mutex);
- jcr->JobFiles++; /* increment number of files sent */
- pm_strcpy(jcr->last_fname, ff_pkt->fname);
- V(jcr->mutex);
-
- /*
- * Send file attributes to Director
- * File_index
- * Stream
- * Verify Options
- * Filename (full path)
- * Encoded attributes
- * Link name (if type==FT_LNK)
- * For a directory, link is the same as fname, but with trailing
- * slash. For a linked file, link is the link.
- */
- /* Send file attributes to Director (note different format than for Storage) */
- Dmsg2(400, "send ATTR inx=%d fname=%s\n", jcr->JobFiles, ff_pkt->fname);
- if (ff_pkt->type == FT_LNK || ff_pkt->type == FT_LNKSAVED) {
- stat = bnet_fsend(dir, "%d %d %s %s%c%s%c%s%c", jcr->JobFiles,
- STREAM_UNIX_ATTRIBUTES, ff_pkt->VerifyOpts, ff_pkt->fname,
- 0, attribs, 0, ff_pkt->link, 0);
- } else if (ff_pkt->type == FT_DIREND) {
+ /*
+ * Send file attributes to Director
+ * File_index
+ * Stream
+ * Verify Options
+ * Filename (full path)
+ * Encoded attributes
+ * Link name (if type==FT_LNK)
+ * For a directory, link is the same as fname, but with trailing
+ * slash. For a linked file, link is the link.
+ */
+ /* Send file attributes to Director (note different format than for Storage) */
+ Dmsg2(400, "send ATTR inx=%d fname=%s\n", jcr->JobFiles, ff_pkt->fname);
+ if (ff_pkt->type == FT_LNK || ff_pkt->type == FT_LNKSAVED) {
+ stat = bnet_fsend(dir, "%d %d %s %s%c%s%c%s%c", jcr->JobFiles,
+ STREAM_UNIX_ATTRIBUTES, ff_pkt->VerifyOpts, ff_pkt->fname,
+ 0, attribs, 0, ff_pkt->link, 0);
+ } else if (ff_pkt->type == FT_DIREND || ff_pkt->type == FT_REPARSE) {