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

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2015-06-08 23:28:49 +01:00
parent c27eafcb5c
commit b19eb94c7e

View File

@ -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)