Merge branch 'dav' into ocsync

Conflicts:
	src/csync_update.c
This commit is contained in:
Olivier Goffart 2013-10-03 12:08:51 +02:00
commit be6e208328
4 changed files with 20 additions and 15 deletions

View file

@ -8,7 +8,7 @@ set(APPLICATION_NAME ${PROJECT_NAME})
set(APPLICATION_VERSION_MAJOR "0")
set(APPLICATION_VERSION_MINOR "90")
set(APPLICATION_VERSION_PATCH "1")
set(APPLICATION_VERSION_PATCH "2")
set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")

View file

@ -1,6 +1,7 @@
ChangeLog
==========
version 0.90.1 (released 2013-09-24, ownCloud Client 1.4.1)
* no more check on the local inode in updater for win32 (bug #779)
* detect if server does not send an etag after an upload
completed.
* fix crash in case of network timeout, reported as

View file

@ -204,18 +204,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
*/
if (csync_get_statedb_exists(ctx)) {
tmp = csync_statedb_get_stat_by_hash(ctx->statedb.db, h);
#if 0
/* this code could possibly replace the one in csync_vio.c stat and would be more efficient */
if(tmp) {
if( ctx->current == LOCAL_REPLICA ) {
if(fs->mtime == tmp->modtime && fs->size == tmp->size) {
/* filesystem modtime is still the same as the db mtime
* thus the md5 sum is still valid. */
fs->md5 = c_strdup( tmp->md5 );
}
}
}
#endif
if(tmp && tmp->phash == h ) { /* there is an entry in the database */
/* we have an update! */
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Database entry found, compare: %" PRId64 " <-> %" PRId64 ", md5: %s <-> %s, inode: %" PRId64 " <-> %" PRId64,
@ -225,8 +214,22 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
goto out;
}
if((ctx->current == REMOTE_REPLICA && !c_streq(fs->md5, tmp->md5 ))
|| (ctx->current == LOCAL_REPLICA && (fs->mtime != tmp->modtime || fs->inode != tmp->inode))) {
// if (!fs->mtime > tmp->modtime) {
|| (ctx->current == LOCAL_REPLICA && (fs->mtime != tmp->modtime
#ifndef _WIN32
|| fs->inode != tmp->inode
#endif
))) {
/* Comparison of the local inode is disabled because people reported problems
* on windows with flacky inode values, see github bug #779
*
* The inode needs to be observed because:
* $> echo a > a.txt ; echo b > b.txt
* both files have the same mtime
* sync them.
* $> rm a.txt && mv b.txt a.txt
* makes b.txt appearing as a.txt yet a sync is not performed because
* both have the same modtime as mv does not change that.
*/
st->instruction = CSYNC_INSTRUCTION_EVAL;
goto out;
}

View file

@ -450,6 +450,7 @@ Hbf_State hbf_transfer( ne_session *session, hbf_transfer_t *transfer, const cha
int do_abort = (transfer->abort_cb)();
if( do_abort ) {
state = HBF_USER_ABORTED;
transfer->start_id = block_id % transfer->block_cnt;
}
}