From: David Stainton Date: Fri, 25 Sep 2015 08:39:27 +0000 (+0200) Subject: Fix is_new_file_time by converting floats to int X-Git-Url: https://git.rkrishnan.org/simplejson/-?a=commitdiff_plain;h=41351dce43e80bd6d03f9b010f3876e913882628;p=tahoe-lafs%2Ftahoe-lafs.git Fix is_new_file_time by converting floats to int --- diff --git a/src/allmydata/backupdb.py b/src/allmydata/backupdb.py index 0263717a..ba348c32 100644 --- a/src/allmydata/backupdb.py +++ b/src/allmydata/backupdb.py @@ -416,11 +416,10 @@ class MagicFolderDB(BackupDB): self.connection.commit() def is_new_file_time(self, path, relpath_u): - """recent_file_time returns true if the file is recent... + """is_new_file_time returns true if the file is recent... meaning its current statinfo (i.e. size, ctime, and mtime) matched the statinfo that was previously stored in the db. """ - #print "check_file_time %s %s" % (path, relpath_u) path = abspath_expanduser_unicode(path) s = os.stat(path) size = s[stat.ST_SIZE] @@ -435,7 +434,7 @@ class MagicFolderDB(BackupDB): if not row: return True (last_size,last_mtime,last_ctime,last_fileid) = row - if (size, ctime, mtime) == (last_size, last_ctime, last_mtime): + if (size, ctime, mtime) == (int(last_size), int(last_ctime), int(last_mtime)): return False else: return True