From d86cb629018d92555e24c3de0f273a089851208c Mon Sep 17 00:00:00 2001 From: David Stainton Date: Fri, 25 Sep 2015 10:39:27 +0200 Subject: [PATCH] Fix is_new_file_time by converting floats to int --- src/allmydata/backupdb.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 -- 2.45.2