From bc2fe74cc1265fb79c4372d65e8a448a30aa9860 Mon Sep 17 00:00:00 2001 From: Axel Kittenberger Date: Tue, 3 Aug 2010 14:26:57 +0000 Subject: [PATCH] minor fix? --- lsyncd.c | 5 ++--- tests/directorycpr.sh | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lsyncd.c b/lsyncd.c index b5a4658..155dacc 100644 --- a/lsyncd.c +++ b/lsyncd.c @@ -1365,13 +1365,12 @@ remove_dirwatch(const struct global_options *opts, dir_watches->data[dw].dirname = NULL; // remove a possible tackle - // (this dir is on the delay list) - if (opts->delay > 0 && dir_watches->data[dw].tackled) { + // (this dir is on the to do/delay list) + if (tackles->len > 0 && dir_watches->data[dw].tackled) { int i; for(i = 0; i < tackles->len; i++) { if (tackles->data[i] == dw) { // move the list up. - // TODO move own logic memmove(tackles->data + i, tackles->data + i + 1, (tackles->len - i - 1) * sizeof(int)); tackles->len--; break; diff --git a/tests/directorycpr.sh b/tests/directorycpr.sh index 8244a46..088934a 100755 --- a/tests/directorycpr.sh +++ b/tests/directorycpr.sh @@ -6,12 +6,11 @@ CON="\E[47;34m" COFF="\033[0m" WORKSOURCE=$(mktemp -d) -WORKTARGET=$(mktemp -d) +WORKSOURCE="/tmp/src" +WORKTARGET="/tmp/trg" PIDFILE=$(mktemp) LOGFILE=$(mktemp) - - echo -e "$CON* populating the filesystem$COFF" mkdir -p "${WORKSOURCE}"/a/a echo 'test' > "${WORKSOURCE}"/a/a/file