From 6930cd6687eefaeb79fbd85c76b02424117f23d0 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Fri, 11 Sep 2015 18:12:24 +0200 Subject: [PATCH] csync_update: Handle error if current_fs is zero. --- csync/src/csync_update.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csync/src/csync_update.c b/csync/src/csync_update.c index 8b9a4b9ec7..99570c2320 100644 --- a/csync/src/csync_update.c +++ b/csync/src/csync_update.c @@ -637,9 +637,8 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn, if( previous_fs ) { previous_fs->has_ignored_files = true; } + goto done; } - goto done; - // previously return 0; } else if(errno == ENOENT) { asp = asprintf( &ctx->error_string, "%s", uri); if (asp < 0) { @@ -661,6 +660,7 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn, } goto done; } + /* if current_fs is not defined here, better throw an error */ } else { CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "opendir failed for %s - errno %d", uri, errno); }