X-Git-Url: https://git.madduck.net/etc/offlineimap.git/blobdiff_plain/aefbbc15b27499b05113fa342fa165b3ab4341ba..2f0acf792cc5b95c5b5ce19f5e68c43c87976a90:/.offlineimap/helper.py diff --git a/.offlineimap/helper.py b/.offlineimap/helper.py index 15824d2..d7b47d3 100644 --- a/.offlineimap/helper.py +++ b/.offlineimap/helper.py @@ -29,11 +29,10 @@ def should_do_full_sync(): now = int(time.time()) try: - mtime = os.stat(FILE)[stat.ST_MTIME] - except OSError: - mtime = 0 + since = now - os.stat(FILE)[stat.ST_MTIME] + except: + since = INTERVAL + 1 - since = now - mtime if since > INTERVAL: file(FILE, 'wb').close() return True