rsyncssh has to be recursive as well, since a move might have been split. fixed a classical wrong errno issue

This commit is contained in:
Axel Kittenberger 2010-12-16 12:56:46 +00:00
parent 2a6955d4c6
commit 83136fc6cd
3 changed files with 4 additions and 2 deletions

View File

@ -358,6 +358,7 @@ open_fsevents(lua_State *L)
.fd = &fsevents_fd, .fd = &fsevents_fd,
}; };
int fd = open(DEV_FSEVENTS, O_RDONLY); int fd = open(DEV_FSEVENTS, O_RDONLY);
int err = errno;
printlogf(L, "Warn", printlogf(L, "Warn",
"Using /dev/fsevents which is considered an OSX internal interface."); "Using /dev/fsevents which is considered an OSX internal interface.");
printlogf(L, "Warn", printlogf(L, "Warn",
@ -368,7 +369,7 @@ open_fsevents(lua_State *L)
if (fd < 0) { if (fd < 0) {
printlogf(L, "Error", printlogf(L, "Error",
"Cannot access %s monitor! (%d:%s)", "Cannot access %s monitor! (%d:%s)",
DEV_FSEVENTS, errno, strerror(errno)); DEV_FSEVENTS, err, strerror(err));
exit(-1); // ERRNO exit(-1); // ERRNO
} }

View File

@ -3211,6 +3211,7 @@ local default_rsyncssh = {
spawn(elist, "/usr/bin/rsync", spawn(elist, "/usr/bin/rsync",
"<", zPaths, "<", zPaths,
config.rsyncOps, config.rsyncOps,
"-r",
"--from0", "--from0",
"--files-from=-", "--files-from=-",
config.source, config.source,

View File

@ -20,7 +20,7 @@ local pid = spawn("./lsyncd", "-nodaemon", "-delay", "5",
cwriteln("waiting for Lsyncd to startup") cwriteln("waiting for Lsyncd to startup")
posix.sleep(1) posix.sleep(1)
churn(srcdir, 20) churn(srcdir, 100)
cwriteln("waiting for Lsyncd to finish its jobs.") cwriteln("waiting for Lsyncd to finish its jobs.")
posix.sleep(10) posix.sleep(10)