diff options
author | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-03-25 07:51:33 +0000 |
---|---|---|
committer | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-03-25 07:51:33 +0000 |
commit | a2da3ed31d63e53e80aaf84e1e8b90a53f44713d (patch) | |
tree | 0e0b980419e2a3d317d04c55b27d395f97e4df7a /rdiff-backup/src/robust.py | |
parent | c28f6258d10db6957df8e692c510edd4fb6a36e4 (diff) | |
download | rdiff-backup-a2da3ed31d63e53e80aaf84e1e8b90a53f44713d.tar.gz |
Added support for gzipped increments
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@23 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
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]) |