mirror of https://github.com/borgbackup/borg.git
set bsdflags last (include immutable flag), fixes #3263
(cherry picked from commit 2c6f9634bc
)
This commit is contained in:
parent
734fee94ad
commit
5d71ae2f66
|
@ -692,11 +692,6 @@ Utilization of max. archive size: {csize_max:.0%}
|
||||||
# some systems don't support calling utime on a symlink
|
# some systems don't support calling utime on a symlink
|
||||||
pass
|
pass
|
||||||
acl_set(path, item, self.numeric_owner)
|
acl_set(path, item, self.numeric_owner)
|
||||||
if not self.nobsdflags and 'bsdflags' in item:
|
|
||||||
try:
|
|
||||||
set_flags(path, item.bsdflags, fd=fd)
|
|
||||||
except OSError:
|
|
||||||
pass
|
|
||||||
# chown removes Linux capabilities, so set the extended attributes at the end, after chown, since they include
|
# chown removes Linux capabilities, so set the extended attributes at the end, after chown, since they include
|
||||||
# the Linux capabilities in the "security.capability" attribute.
|
# the Linux capabilities in the "security.capability" attribute.
|
||||||
xattrs = item.get('xattrs', {})
|
xattrs = item.get('xattrs', {})
|
||||||
|
@ -719,6 +714,12 @@ Utilization of max. archive size: {csize_max:.0%}
|
||||||
set_ec(EXIT_WARNING)
|
set_ec(EXIT_WARNING)
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
# bsdflags include the immutable flag and need to be set last:
|
||||||
|
if not self.nobsdflags and 'bsdflags' in item:
|
||||||
|
try:
|
||||||
|
set_flags(path, item.bsdflags, fd=fd)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
|
||||||
def set_meta(self, key, value):
|
def set_meta(self, key, value):
|
||||||
metadata = self._load_meta(self.id)
|
metadata = self._load_meta(self.id)
|
||||||
|
|
Loading…
Reference in New Issue