[Pkg-owncloud-commits] [owncloud-client] 331/470: CSync: Allow files with 0 mtime #1603
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu May 12 16:25:21 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit a0521caf52507de62045725ca542169a83b08b04
Author: Markus Goetz <markus at woboq.com>
Date: Thu Apr 14 18:12:37 2016 +0200
CSync: Allow files with 0 mtime #1603
I don't see a reason we should not allow this. We detect
a "failed stat reply" in other ways. Maybe this was a legacy
csync decision somewhow that is not valid anymore?
---
csync/src/csync_update.c | 25 -------------------------
1 file changed, 25 deletions(-)
diff --git a/csync/src/csync_update.c b/csync/src/csync_update.c
index 95aee7c..88cfe02 100644
--- a/csync/src/csync_update.c
+++ b/csync/src/csync_update.c
@@ -245,33 +245,9 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
st->etag = NULL;
st->child_modified = 0;
st->has_ignored_files = 0;
-
- /* FIXME: Under which conditions are the following two ifs true and the code
- * is executed? */
if (type == CSYNC_FTW_TYPE_FILE ) {
if (fs->mtime == 0) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "file: %s - mtime is zero!", path);
-
- tmp = csync_statedb_get_stat_by_hash(ctx, h);
- if(_last_db_return_error(ctx)) {
- SAFE_FREE(st);
- SAFE_FREE(tmp);
- ctx->status_code = CSYNC_STATUS_UNSUCCESSFUL;
- return -1;
- }
-
- if (tmp == NULL) {
- CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "file: %s - not found in db, IGNORE!", path);
- st->instruction = CSYNC_INSTRUCTION_IGNORE;
- } else {
- SAFE_FREE(st);
- st = tmp;
- st->instruction = CSYNC_INSTRUCTION_NONE;
- CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "file: %s - tmp non zero, mtime %lu", path, st->modtime );
- tmp = NULL;
- }
- goto fastout; /* Skip copying of the etag. That's an important difference to upstream
- * without etags. */
}
}
@@ -535,7 +511,6 @@ out:
strncpy(st->remotePerm, fs->remotePerm, REMOTE_PERM_BUF_SIZE);
}
-fastout: /* target if the file information is read from database into st */
st->phash = h;
st->pathlen = len;
memcpy(st->path, (len ? path : ""), len + 1);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list