Improved logging in error case (minor fix).

This commit is contained in:
Klaas Freitag 2012-07-31 17:58:49 +03:00
parent 6ba5bf45d8
commit 5b38e2cb5a
2 changed files with 7 additions and 3 deletions

View file

@ -417,6 +417,11 @@ int csync_update(CSYNC *ctx) {
rc = csync_ftw(ctx, ctx->remote.uri, csync_walker, MAX_DEPTH);
if( rc < 0 ) {
if( errno == 5 ) {
ctx->error_code = CSYNC_ERR_ACCESS_FAILED; // FIXME: improve error handling!
}
}
csync_gettime(&finish);
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG,

View file

@ -223,9 +223,8 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
} else {
strerror_r(errno, errbuf, sizeof(errbuf));
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR,
"opendir failed for %s - %s",
uri,
errbuf);
"opendir failed for %s - %s (errno %d)",
uri, errbuf, errno);
goto error;
}
}