Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/csync
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2014-12-01 15:53:30 +0300
committerOlivier Goffart <ogoffart@woboq.com>2014-12-01 15:53:30 +0300
commit2477c3914e377de42c8e5fb733d484ab0f3e0cef (patch)
tree3b87f69327b078414799a8843681cb9e0fef5ff8 /csync
parent3253cc38b219b5aa39c03e8793de8426d97b426d (diff)
csync_update: Ignore a difference of time of exactly one hour
Issue #2438
Diffstat (limited to 'csync')
-rw-r--r--csync/src/csync_update.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/csync/src/csync_update.c b/csync/src/csync_update.c
index 2934d71ab..b7eff2bac 100644
--- a/csync/src/csync_update.c
+++ b/csync/src/csync_update.c
@@ -29,6 +29,7 @@
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
+#include <time.h>
#include "c_lib.h"
#include "c_jhash.h"
@@ -266,7 +267,10 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
goto out;
}
if((ctx->current == REMOTE_REPLICA && !c_streq(fs->etag, tmp->etag ))
- || (ctx->current == LOCAL_REPLICA && (fs->mtime != tmp->modtime
+ || (ctx->current == LOCAL_REPLICA && ((fs->mtime != tmp->modtime
+ /* Ignore when there is exactly one hour difference because of summer time switches */
+ && (int64_t)difftime(fs->mtime, tmp->modtime) != 3600
+ && (int64_t)difftime(fs->mtime, tmp->modtime) != -3600)
// zero size in statedb can happen during migration
|| (tmp->size != 0 && fs->size != tmp->size)
#if 0