projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
200a8c0
)
Fix version incrementation bug
author
David Stainton
<dstainton415@gmail.com>
Sat, 12 Sep 2015 18:09:55 +0000
(20:09 +0200)
committer
Daira Hopwood
<daira@jacaranda.org>
Tue, 15 Sep 2015 17:43:00 +0000
(18:43 +0100)
only increment if mtimes are differing...
src/allmydata/frontends/magic_folder.py
patch
|
blob
|
history
diff --git
a/src/allmydata/frontends/magic_folder.py
b/src/allmydata/frontends/magic_folder.py
index c7e589783f3d6a780f00bb89b94941ca39656963..88f507db3619dcc9ba93cc502d1539edde672acd 100644
(file)
--- a/
src/allmydata/frontends/magic_folder.py
+++ b/
src/allmydata/frontends/magic_folder.py
@@
-346,7
+346,11
@@
class Uploader(QueueMixin):
if version is None:
version = 0
else:
- version += 1
+ if self._db.is_new_file_time(os.path.join(self._local_path_u, relpath_u), relpath_u):
+ version += 1
+ print "version incremented to %s" % (version,)
+ else:
+ print "version not incremented"
uploadable = FileName(path_u, self._client.convergence)
d2 = self._upload_dirnode.add_file(encoded_name_u, uploadable, metadata={"version":version}, overwrite=True)