summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-07-11 16:45:55 +0300
committerLars Wirzenius <liw@liw.fi>2015-07-11 16:45:55 +0300
commita48a31cc307082add1de2b80c7d8fb459d6a03bf (patch)
tree2104804c57bda34e9bcd4f745fdc26356c18b569
parent5c530a5ae8d9a3d2f2e9fb96f7152c32673b74b0 (diff)
downloadobnam-a48a31cc307082add1de2b80c7d8fb459d6a03bf.tar.gz
Do not require / is in cache when flushing GATree
-rw-r--r--obnamlib/fmt_ga/tree.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/obnamlib/fmt_ga/tree.py b/obnamlib/fmt_ga/tree.py
index 8e5e01f2..cd8dba9f 100644
--- a/obnamlib/fmt_ga/tree.py
+++ b/obnamlib/fmt_ga/tree.py
@@ -121,7 +121,8 @@ class GATree(object):
self.set_directory(parent_path, parent_obj)
def flush(self):
- self._root_dir_id = self._fixup_subdir_refs('/')
+ if '/' in self._cache:
+ self._root_dir_id = self._fixup_subdir_refs('/')
self._blob_store.flush()
self._cache.clear()