From 3ddac7b88ec498ed70ed177a830e943ae1c3a627 Mon Sep 17 00:00:00 2001 From: bescoto Date: Thu, 20 Oct 2005 20:20:29 +0000 Subject: Fix for bug #14799 -- now autodetect whether destination supports high permissions git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@639 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/rdiff_backup/Main.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'rdiff-backup/rdiff_backup/Main.py') diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py index 4a6450d..8946572 100644 --- a/rdiff-backup/rdiff_backup/Main.py +++ b/rdiff-backup/rdiff_backup/Main.py @@ -450,6 +450,8 @@ def backup_set_fs_globals(rpin, rpout): SetConnections.UpdateGlobal('fsync_directories', dest_fsa.fsync_dirs) SetConnections.UpdateGlobal('change_ownership', dest_fsa.ownership) SetConnections.UpdateGlobal('chars_to_quote', dest_fsa.chars_to_quote) + if not dest_fsa.high_perms: + SetConnections.UpdateGlobal('permission_mask', 0777) if Globals.chars_to_quote: FilenameMapping.set_init_quote_vals() def backup_touch_curmirror_local(rpin, rpout): @@ -555,6 +557,8 @@ def restore_set_fs_globals(target): if Globals.preserve_hardlinks != 0: SetConnections.UpdateGlobal('preserve_hardlinks', target_fsa.hardlinks) SetConnections.UpdateGlobal('change_ownership', target_fsa.ownership) + if not target_fsa.high_perms: + SetConnections.UpdateGlobal('permission_mask', 0777) if Globals.chars_to_quote is None: # otherwise already overridden if mirror_fsa.chars_to_quote: @@ -735,6 +739,7 @@ def single_set_fs_globals(rbdir): SetConnections.UpdateGlobal('preserve_hardlinks', fsa.hardlinks) SetConnections.UpdateGlobal('fsync_directories', fsa.fsync_dirs) SetConnections.UpdateGlobal('change_ownership', fsa.ownership) + if not fsa.high_perms: SetConnections.UpdateGlobal('permission_mask', 0777) SetConnections.UpdateGlobal('chars_to_quote', fsa.chars_to_quote) if Globals.chars_to_quote: for conn in Globals.connections: -- cgit v1.2.1