]> git.madduck.net Git - etc/offlineimap.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

rework logic when to do partial syncs
authormartin f. krafft <madduck@madduck.net>
Wed, 24 Mar 2010 20:19:24 +0000 (21:19 +0100)
committermartin f. krafft <madduck@madduck.net>
Wed, 24 Mar 2010 20:19:24 +0000 (21:19 +0100)
.offlineimap/helper.py

index 15824d25adcfb300500f04ae501528baed5a17c4..d7b47d3720dd830b61a49911ea99adc575cebed3 100644 (file)
@@ -29,11 +29,10 @@ def should_do_full_sync():
     now = int(time.time())
 
     try:
     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
     if since > INTERVAL:
         file(FILE, 'wb').close()
         return True