]> 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)
committerDavid Stainton <dstainton415@gmail.com>
Fri, 17 Apr 2015 21:25:30 +0000 (22:25 +0100)
src/allmydata/frontends/drop_upload.py

index 47ab03011296bb86b8a6b541112a4683b19e00ed..57ff6705edab69e12e6b776b0edbd196b19e6601 100644 (file)
@@ -158,12 +158,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)