From 83136fc6cd05a8306f0093b91043a7a76a95b066 Mon Sep 17 00:00:00 2001 From: Axel Kittenberger Date: Thu, 16 Dec 2010 12:56:46 +0000 Subject: [PATCH] rsyncssh has to be recursive as well, since a move might have been split. fixed a classical wrong errno issue --- fsevents.c | 3 ++- lsyncd.lua | 1 + tests/churn-rsyncssh.lua | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fsevents.c b/fsevents.c index 9a4f933..bddaf6d 100644 --- a/fsevents.c +++ b/fsevents.c @@ -358,6 +358,7 @@ open_fsevents(lua_State *L) .fd = &fsevents_fd, }; int fd = open(DEV_FSEVENTS, O_RDONLY); + int err = errno; printlogf(L, "Warn", "Using /dev/fsevents which is considered an OSX internal interface."); printlogf(L, "Warn", @@ -368,7 +369,7 @@ open_fsevents(lua_State *L) if (fd < 0) { printlogf(L, "Error", "Cannot access %s monitor! (%d:%s)", - DEV_FSEVENTS, errno, strerror(errno)); + DEV_FSEVENTS, err, strerror(err)); exit(-1); // ERRNO } diff --git a/lsyncd.lua b/lsyncd.lua index 65d225b..c6fbf66 100644 --- a/lsyncd.lua +++ b/lsyncd.lua @@ -3211,6 +3211,7 @@ local default_rsyncssh = { spawn(elist, "/usr/bin/rsync", "<", zPaths, config.rsyncOps, + "-r", "--from0", "--files-from=-", config.source, diff --git a/tests/churn-rsyncssh.lua b/tests/churn-rsyncssh.lua index 3ebdeae..914268b 100755 --- a/tests/churn-rsyncssh.lua +++ b/tests/churn-rsyncssh.lua @@ -20,7 +20,7 @@ local pid = spawn("./lsyncd", "-nodaemon", "-delay", "5", cwriteln("waiting for Lsyncd to startup") posix.sleep(1) -churn(srcdir, 20) +churn(srcdir, 100) cwriteln("waiting for Lsyncd to finish its jobs.") posix.sleep(10)