mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-07 17:14:03 +00:00
minor fix?
This commit is contained in:
parent
55b966b43b
commit
bc2fe74cc1
5
lsyncd.c
5
lsyncd.c
@ -1365,13 +1365,12 @@ remove_dirwatch(const struct global_options *opts,
|
|||||||
dir_watches->data[dw].dirname = NULL;
|
dir_watches->data[dw].dirname = NULL;
|
||||||
|
|
||||||
// remove a possible tackle
|
// remove a possible tackle
|
||||||
// (this dir is on the delay list)
|
// (this dir is on the to do/delay list)
|
||||||
if (opts->delay > 0 && dir_watches->data[dw].tackled) {
|
if (tackles->len > 0 && dir_watches->data[dw].tackled) {
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < tackles->len; i++) {
|
for(i = 0; i < tackles->len; i++) {
|
||||||
if (tackles->data[i] == dw) {
|
if (tackles->data[i] == dw) {
|
||||||
// move the list up.
|
// move the list up.
|
||||||
// TODO move own logic
|
|
||||||
memmove(tackles->data + i, tackles->data + i + 1, (tackles->len - i - 1) * sizeof(int));
|
memmove(tackles->data + i, tackles->data + i + 1, (tackles->len - i - 1) * sizeof(int));
|
||||||
tackles->len--;
|
tackles->len--;
|
||||||
break;
|
break;
|
||||||
|
@ -6,12 +6,11 @@ CON="\E[47;34m"
|
|||||||
COFF="\033[0m"
|
COFF="\033[0m"
|
||||||
|
|
||||||
WORKSOURCE=$(mktemp -d)
|
WORKSOURCE=$(mktemp -d)
|
||||||
WORKTARGET=$(mktemp -d)
|
WORKSOURCE="/tmp/src"
|
||||||
|
WORKTARGET="/tmp/trg"
|
||||||
PIDFILE=$(mktemp)
|
PIDFILE=$(mktemp)
|
||||||
LOGFILE=$(mktemp)
|
LOGFILE=$(mktemp)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo -e "$CON* populating the filesystem$COFF"
|
echo -e "$CON* populating the filesystem$COFF"
|
||||||
mkdir -p "${WORKSOURCE}"/a/a
|
mkdir -p "${WORKSOURCE}"/a/a
|
||||||
echo 'test' > "${WORKSOURCE}"/a/a/file
|
echo 'test' > "${WORKSOURCE}"/a/a/file
|
||||||
|
Loading…
Reference in New Issue
Block a user