From fb177b31262c246fa3a1b796ad5149fbd5f18780 Mon Sep 17 00:00:00 2001 From: Axel Kittenberger Date: Wed, 15 Dec 2010 13:33:48 +0000 Subject: [PATCH] fix data inconsistency, create recursively --- fsevents.c | 2 +- lsyncd.lua | 4 +++- tests/churn-rsync.lua | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fsevents.c b/fsevents.c index 43079a1..4e398a5 100644 --- a/fsevents.c +++ b/fsevents.c @@ -377,7 +377,7 @@ open_fsevents(lua_State *L) printlogf(L, "Warn", "Using /dev/fsevents which is considered an OSX internal interface."); printlogf(L, "Warn", - "Functionality might break across OSX versions"); + "Functionality might break across OSX versions (This is for 10.5.X)"); printlogf(L, "Warn", "A hanging Lsyncd might cause Spotlight/Timemachine doing extra work."); diff --git a/lsyncd.lua b/lsyncd.lua index 41f98bb..65d225b 100644 --- a/lsyncd.lua +++ b/lsyncd.lua @@ -3042,7 +3042,9 @@ local default_rsync = { local paths = elist.getPaths( function(etype, path1, path2) - if etype == "Delete" and string.byte(path1, -1) == 47 then + if (etype == "Delete" or etype == "Create") + and string.byte(path1, -1) == 47 + then return sub(path1) .. "***", sub(path2) else return sub(path1), sub(path2) diff --git a/tests/churn-rsync.lua b/tests/churn-rsync.lua index a9bdf8e..347698a 100755 --- a/tests/churn-rsync.lua +++ b/tests/churn-rsync.lua @@ -18,7 +18,7 @@ local pid = spawn("./lsyncd", "-nodaemon", "-delay", "5", cwriteln("waiting for Lsyncd to startup") posix.sleep(1) -churn(srcdir, 100) +churn(srcdir, 500) cwriteln("waiting for Lsyncd to finish its jobs.") posix.sleep(10)