From 128926cac77623e08c5eb62d461b975b6a198e6f Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Mon, 24 Sep 2012 15:54:17 +0300 Subject: [PATCH] Check path for len exactly 1 when comparing on '.'. --- src/csync_propagate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/csync_propagate.c b/src/csync_propagate.c index 0f989899b..dab76e903 100644 --- a/src/csync_propagate.c +++ b/src/csync_propagate.c @@ -1090,7 +1090,10 @@ static int _csync_correct_id(CSYNC *ctx) { CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "correct ID on dir: %s", path); /* handle the . path */ - if( path && path[0] == '.' ) path = NULL; + if( path && path[0] == '.' && strlen(path) == 1) { + SAFE_FREE(path); + path = NULL; + } while( path ) { uint64_t h;