diff options
Diffstat (limited to 'rdiff-backup/src/robust.py')
-rw-r--r-- | rdiff-backup/src/robust.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rdiff-backup/src/robust.py b/rdiff-backup/src/robust.py index 206e9d5..17942d3 100644 --- a/rdiff-backup/src/robust.py +++ b/rdiff-backup/src/robust.py @@ -142,13 +142,14 @@ class Robust: tfl[0].rename(rpout) return RobustAction(init, final, lambda e: tfl[0] and tfl[0].delete()) - def copy_with_attribs_action(rorpin, rpout): + def copy_with_attribs_action(rorpin, rpout, compress = None): """Like copy_action but also copy attributes""" tfl = [None] # Need mutable object that init and final can access def init(): if not (rorpin.isdir() and rpout.isdir()): # already a dir tfl[0] = TempFileManager.new(rpout) - if rorpin.isreg(): tfl[0].write_from_fileobj(rorpin.open("rb")) + if rorpin.isreg(): + tfl[0].write_from_fileobj(rorpin.open("rb"), compress) else: RPath.copy(rorpin, tfl[0]) if tfl[0].lstat(): # Some files, like sockets, won't be created RPathStatic.copy_attribs(rorpin, tfl[0]) |