diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-02-12 07:28:33 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-02-12 07:28:33 +0000 |
commit | adc9d7a9a9cd90c8d078b1276cfdad98d0303d07 (patch) | |
tree | afa49da6e1ebc85a0d16aad52591e55bda0c70f2 /rdiff-backup/rdiff_backup/metadata.py | |
parent | 9613406fbab1949f66fe7858590cab990c7b4b25 (diff) | |
download | rdiff-backup-adc9d7a9a9cd90c8d078b1276cfdad98d0303d07.tar.gz |
Fixed selection bug, renamed metadata files to ".snapshot"
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@278 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/metadata.py')
-rw-r--r-- | rdiff-backup/rdiff_backup/metadata.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/rdiff-backup/rdiff_backup/metadata.py b/rdiff-backup/rdiff_backup/metadata.py index ec86168..8b4e96d 100644 --- a/rdiff-backup/rdiff_backup/metadata.py +++ b/rdiff-backup/rdiff_backup/metadata.py @@ -266,8 +266,8 @@ def OpenMetadata(rp = None, compress = 1): assert not metadata_fileobj, "Metadata file already open" if rp: metadata_rp = rp else: - if compress: typestr = 'data.gz' - else: typestr = 'data' + if compress: typestr = 'snapshot.gz' + else: typestr = 'snapshot' metadata_rp = Globals.rbdir.append("mirror_metadata.%s.%s" % (Time.curtimestr, typestr)) metadata_fileobj = metadata_rp.open("wb", compress = compress) @@ -293,7 +293,7 @@ def GetMetadata(rp, restrict_index = None, compressed = None): if compressed is None: if rp.isincfile(): compressed = rp.inc_compressed - assert rp.inc_type == "data", rp.inc_type + assert rp.inc_type == "data" or rp.inc_type == "snapshot" else: compressed = rp.get_indexpath().endswith(".gz") fileobj = rp.open("rb", compress = compressed) @@ -311,7 +311,8 @@ def GetMetadata_at_time(rbdir, time, restrict_index = None, rblist = None): if rblist is None: rblist = map(lambda x: rbdir.append(x), robust.listrp(rbdir)) for rp in rblist: - if (rp.isincfile() and rp.getinctype() == "data" and + if (rp.isincfile() and + (rp.getinctype() == "data" or rp.getinctype() == "snapshot") and rp.getincbase_str() == "mirror_metadata"): if rp.getinctime() == time: return GetMetadata(rp, restrict_index) return None |