From: Daira Hopwood <daira@jacaranda.org>
Date: Mon, 8 Jun 2015 22:28:49 +0000 (+0100)
Subject: Explicitly pass overwrite=True to add_file. (It is the default, but this is clearer.)
X-Git-Url: https://git.rkrishnan.org/specifications/components?a=commitdiff_plain;h=7d4b03e1b1f248dd3f22e6e968a16266322ff457;p=tahoe-lafs%2Ftahoe-lafs.git

Explicitly pass overwrite=True to add_file. (It is the default, but this is clearer.)

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
---

diff --git a/src/allmydata/frontends/drop_upload.py b/src/allmydata/frontends/drop_upload.py
index 452b92ce..388104f5 100644
--- a/src/allmydata/frontends/drop_upload.py
+++ b/src/allmydata/frontends/drop_upload.py
@@ -205,13 +205,13 @@ class DropUploader(service.MultiService):
 
         def _add_file(name):
             u = FileName(path, self._convergence)
-            return self._parent.add_file(name, u)
+            return self._parent.add_file(name, u, overwrite=True)
 
         def _add_dir(name):
             self._notifier.watch(to_filepath(path), mask=self.mask, callbacks=[self._notify], recursive=True)
             u = Data("", self._convergence)
             name += "@_"
-            d2 = self._parent.add_file(name, u)
+            d2 = self._parent.add_file(name, u, overwrite=True)
             def _succeeded(ign):
                 self._log("created subdirectory %r" % (path,))
                 self._stats_provider.count('drop_upload.directories_created', 1)