Commit 9b99e1d0 authored by bescoto's avatar bescoto

Oops, missed another append('rsrc') loop, this time in fs_abilities


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@349 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 1fc70b9b
......@@ -330,13 +330,14 @@ def backup_set_fs_globals(rpin, rpout):
src_fsa = fs_abilities.FSAbilities('source').init_readonly(rpin)
Log(str(src_fsa), 3)
update_bool_global('read_acls', src_fsa.acls)
update_bool_global('read_eas', src_fsa.eas)
update_bool_global('read_resource_forks', src_fsa.resource_forks)
dest_fsa = fs_abilities.FSAbilities('destination').init_readwrite(
Globals.rbdir, override_chars_to_quote = Globals.chars_to_quote)
Log(str(dest_fsa), 3)
update_bool_global('read_acls', src_fsa.acls)
update_bool_global('read_eas', src_fsa.eas)
update_bool_global('read_resource_forks', src_fsa.resource_forks)
SetConnections.UpdateGlobal('preserve_hardlinks', dest_fsa.hardlinks)
SetConnections.UpdateGlobal('fsync_directories', dest_fsa.fsync_dirs)
SetConnections.UpdateGlobal('change_ownership', dest_fsa.ownership)
......@@ -422,6 +423,9 @@ def restore_set_fs_globals(target):
target_fsa = fs_abilities.FSAbilities('destination').init_readwrite(
target, 0)
mirror_fsa = fs_abilities.FSAbilities('source').init_readwrite(
Globals.rbdir)
update_bool_global('read_acls', target_fsa.acls)
update_bool_global('write_acls', target_fsa.acls)
update_bool_global('read_eas', target_fsa.eas)
......@@ -429,8 +433,6 @@ def restore_set_fs_globals(target):
SetConnections.UpdateGlobal('preserve_hardlinks', target_fsa.hardlinks)
SetConnections.UpdateGlobal('change_ownership', target_fsa.ownership)
mirror_fsa = fs_abilities.FSAbilities('source').init_readwrite(
Globals.rbdir)
if Globals.chars_to_quote is None: # otherwise already overridden
if mirror_fsa.chars_to_quote:
SetConnections.UpdateGlobal('chars_to_quote',
......
......@@ -1021,9 +1021,12 @@ class RPath(RORPath):
assert self.isreg()
try: rfork = self.data['resourcefork']
except KeyError:
rfork_fp = self.conn.open(os.path.join(self.path, 'rsrc'), 'rb')
rfork = rfork_fp.read()
assert not rfork_fp.close()
try:
rfork_fp = self.conn.open(os.path.join(self.path, 'rsrc'),
'rb')
rfork = rfork_fp.read()
assert not rfork_fp.close()
except (IOError, OSError), e: rfork = ''
self.data['resourcefork'] = rfork
return rfork
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment