summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2010-06-28 17:20:24 +1200
committerLars Wirzenius <liw@liw.fi>2010-06-28 17:20:24 +1200
commit9ba141d0e7a2a0cb72ccee27247347160a5e1878 (patch)
tree85f833e24583d50510c51da1130f3a36f235b38b
parent4015e7eb19bf45fe97656d433e867f42487b9330 (diff)
downloadobnam-9ba141d0e7a2a0cb72ccee27247347160a5e1878.tar.gz
Only create the directory for chunks if it does not exist.
-rw-r--r--obnamlib/store.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/obnamlib/store.py b/obnamlib/store.py
index a799dc4b..e23db388 100644
--- a/obnamlib/store.py
+++ b/obnamlib/store.py
@@ -867,7 +867,8 @@ class Store(object):
if not self.fs.exists(filename):
break
dirname = os.path.dirname(filename)
- self.fs.makedirs(dirname)
+ if not self.fs.exists(dirname):
+ self.fs.makedirs(dirname)
self.fs.write_file(filename, data)
self.chunksums.add(self.checksum(data), chunkid)
return chunkid