]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Remove filepath from pending set earlier
authorDavid Stainton <dstainton415@gmail.com>
Fri, 17 Apr 2015 21:25:30 +0000 (22:25 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Tue, 28 Apr 2015 18:39:37 +0000 (19:39 +0100)
src/allmydata/frontends/drop_upload.py

index 75248e55d76b0a76c804dff1fc187c2962be97aa..b2f1a5d592d9bd7930d04f993b77b23146210141 100644 (file)
@@ -164,12 +164,11 @@ class DropUploader(service.MultiService):
         # FIXME (ticket #1712): if this already exists as a mutable file, we replace the
         # directory entry, but we should probably modify the file (as the SFTP frontend does).
         def _add_file(ign):
+            self._pending.remove(path)
             name = path.basename()
             # on Windows the name is already Unicode
             if sys.platform != "win32":
                 name = name.decode(get_filesystem_encoding())
-
-            self._pending.remove(path)
             u = FileName(path.path, self._convergence)
             return self._parent.add_file(name, u)
         d.addCallback(_add_file)