--- bacula-2.5-20080825svn/src/filed/restore.c.ori 2008-09-10 12:31:34.000000000 +0200 +++ bacula-2.5-20080825svn/src/filed/restore.c 2008-09-10 14:48:23.000000000 +0200 @@ -368,6 +368,8 @@ switch (stat) { case CF_ERROR: case CF_SKIP: + pm_strcpy(jcr->last_fname, attr->ofname); + jcr->last_type = attr->type; break; case CF_EXTRACT: /* File created and we expect file data */ extract = true; @@ -599,6 +601,14 @@ break; case STREAM_UNIX_ACCESS_ACL: + /* + * Do not restore ACLs when + * a) The current file is not extracted + * b) and it is not a directory (they are never "extracted") + * c) and file name is non-empty + */ + if (!extract && jcr->last_type != FT_DIREND && (*jcr->last_fname != 0)) break; + if (have_acl) { pm_strcpy(jcr->acl_text, sd->msg); Dmsg2(400, "Restoring ACL type 0x%2x <%s>\n", BACL_TYPE_ACCESS, jcr->acl_text); @@ -611,6 +621,8 @@ break; case STREAM_UNIX_DEFAULT_ACL: + if (!extract && jcr->last_type != FT_DIREND && (*jcr->last_fname != 0)) break; + if (have_acl) { pm_strcpy(jcr->acl_text, sd->msg); Dmsg2(400, "Restoring ACL type 0x%2x <%s>\n", BACL_TYPE_DEFAULT, jcr->acl_text);