From ff7ba129146e0df002e55ddb86611c5aae4646b7 Mon Sep 17 00:00:00 2001
From: David Stainton <dstainton415@gmail.com>
Date: Wed, 15 Jul 2015 12:24:00 -0700
Subject: [PATCH] don't double increment version

---
 src/allmydata/frontends/magic_folder.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py
index 43cfbd87..ce260343 100644
--- a/src/allmydata/frontends/magic_folder.py
+++ b/src/allmydata/frontends/magic_folder.py
@@ -395,7 +395,7 @@ class MagicFolder(service.MultiService):
                     d2.addCallback(get_metadata)
                     def set_deleted(metadata):
                         current_version = self._db.get_local_file_version(path) + 1
-                        metadata['version'] = current_version + 1
+                        metadata['version'] = current_version
                         metadata['deleted'] = True
                         emptyUploadable = Data("", self._convergence)
                         return self._upload_dirnode.add_file(name, emptyUploadable, overwrite=True, metadata=metadata)
-- 
2.45.2