summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-07-09 22:36:42 +0300
committerLars Wirzenius <liw@liw.fi>2015-07-09 22:36:42 +0300
commit6955838388cce026e5b0262e97741e73099b7a29 (patch)
treeda0dd0daa21dbda1eaefc3eeebe5a6c97c3e52e9
parent6aab97f830d2a953c1c9c5de94dc8139759825da (diff)
downloadobnam-6955838388cce026e5b0262e97741e73099b7a29.tar.gz
Bugfix: only add file to GAFileMetadata if not there
-rw-r--r--obnamlib/fmt_ga/client.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/obnamlib/fmt_ga/client.py b/obnamlib/fmt_ga/client.py
index 19dbadd1..9ee7ff3f 100644
--- a/obnamlib/fmt_ga/client.py
+++ b/obnamlib/fmt_ga/client.py
@@ -417,10 +417,11 @@ class GAFileMetadata(object):
return filename in self._files
def add_file(self, filename):
- self._files[filename] = {
- 'keys': {},
- 'chunks': [],
- }
+ if filename not in self._files:
+ self._files[filename] = {
+ 'keys': {},
+ 'chunks': [],
+ }
def remove_file(self, filename):
if filename in self._files: