Commit 9665f19d authored by bescoto's avatar bescoto

Added --no-change-dir-inc-perms switch, and fix for windows mode CheckDest


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@342 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent ffde3f76
...@@ -199,6 +199,10 @@ Do not create an rdiff-backup-data directory or make any increments. ...@@ -199,6 +199,10 @@ Do not create an rdiff-backup-data directory or make any increments.
In this mode rdiff-backup is similar to rsync (but usually In this mode rdiff-backup is similar to rsync (but usually
slower). slower).
.TP .TP
.B --no-change-dir-inc-perms
Do not change the permissions of the directory increments to match the
directories they represent.
.TP
.B --no-compare-inode .B --no-compare-inode
This relatively esoteric option prevents rdiff-backup from flagging a This relatively esoteric option prevents rdiff-backup from flagging a
file as changed when its inode changes. This option may be useful if file as changed when its inode changes. This option may be useful if
......
...@@ -200,6 +200,11 @@ compare_inode = 1 ...@@ -200,6 +200,11 @@ compare_inode = 1
# guarantee that any changes have been committed to disk. # guarantee that any changes have been committed to disk.
fsync_directories = 1 fsync_directories = 1
# If set, directory increments are given the same permissions as the
# directories they represent. Otherwise they have the default
# permissions.
change_dir_inc_perms = 1
def get(name): def get(name):
"""Return the value of something in this module""" """Return the value of something in this module"""
......
...@@ -56,8 +56,9 @@ def parse_cmdlineoptions(arglist): ...@@ -56,8 +56,9 @@ def parse_cmdlineoptions(arglist):
"include-globbing-filelist=", "include-regexp=", "include-globbing-filelist=", "include-regexp=",
"list-at-time=", "list-changed-since=", "list-increments", "list-at-time=", "list-changed-since=", "list-increments",
"list-increment-sizes", "no-compare-inode", "list-increment-sizes", "no-compare-inode",
"no-compression", "no-compression-regexp=", "no-change-dir-inc-perms", "no-compression",
"no-file-statistics", "no-hard-links", "null-separator", "no-compression-regexp=", "no-file-statistics",
"no-hard-links", "null-separator",
"override-chars-to-quote=", "parsable-output", "override-chars-to-quote=", "parsable-output",
"print-statistics", "remote-cmd=", "remote-schema=", "print-statistics", "remote-cmd=", "remote-schema=",
"remove-older-than=", "restore-as-of=", "restrict=", "remove-older-than=", "restore-as-of=", "restrict=",
...@@ -106,6 +107,8 @@ def parse_cmdlineoptions(arglist): ...@@ -106,6 +107,8 @@ def parse_cmdlineoptions(arglist):
elif opt == "-l" or opt == "--list-increments": elif opt == "-l" or opt == "--list-increments":
action = "list-increments" action = "list-increments"
elif opt == '--list-increment-sizes': action = 'list-increment-sizes' elif opt == '--list-increment-sizes': action = 'list-increment-sizes'
elif opt == '--no-change-dir-inc-perms':
Globals.set('change_dir_inc_perms', 0)
elif opt == "--no-compare-inode": Globals.set("compare_inode", 0) elif opt == "--no-compare-inode": Globals.set("compare_inode", 0)
elif opt == "--no-compression": Globals.set("compression", None) elif opt == "--no-compression": Globals.set("compression", None)
elif opt == "--no-compression-regexp": elif opt == "--no-compression-regexp":
...@@ -617,6 +620,8 @@ def ListAtTime(rp): ...@@ -617,6 +620,8 @@ def ListAtTime(rp):
def CheckDest(dest_rp): def CheckDest(dest_rp):
"""Check the destination directory, """ """Check the destination directory, """
if Globals.quoting_enabled:
dest_rp = FilenameMapping.get_quotedrpath(dest_rp)
if Globals.rbdir is None: if Globals.rbdir is None:
SetConnections.UpdateGlobal('rbdir', SetConnections.UpdateGlobal('rbdir',
dest_rp.append_path("rdiff-backup-data")) dest_rp.append_path("rdiff-backup-data"))
......
...@@ -87,8 +87,9 @@ def makedir(mirrordir, incpref): ...@@ -87,8 +87,9 @@ def makedir(mirrordir, incpref):
"""Make file indicating directory mirrordir has changed""" """Make file indicating directory mirrordir has changed"""
dirsign = get_inc(incpref, "dir") dirsign = get_inc(incpref, "dir")
dirsign.touch() dirsign.touch()
# Below, don't copy acls because directories can have more of them if Globals.change_dir_inc_perms:
# than ordinary files (they have default acls also). # Below, don't copy acls because directories can have more of
# them than ordinary files (they have default acls also).
rpath.copy_attribs(mirrordir, dirsign, acls = 0) rpath.copy_attribs(mirrordir, dirsign, acls = 0)
return dirsign return dirsign
......
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