fixing default.rsync (especially on OSX

This commit is contained in:
Axel Kittenberger 2012-02-16 14:54:09 +01:00
parent 86acc69c4e
commit e0812e7e07
3 changed files with 5 additions and 2 deletions

View File

@ -16,6 +16,7 @@
even when another part of the tree made an IO-error.
fix: default.direct now not using -p for mkdir since if the dir is not there it should fail
fix: default.direct now not using -t for cp since OSX binutils doesn't understand it
fix: default.rsync might have missed some files on OSX fsevents when moving directories
change: complain if any "rsyncOps" is given
change: splitted the default configurations in their own files.
more cleanly seperated from the Lsyncd runner, and highlights it are just

View File

@ -45,7 +45,9 @@ default.rsync = {
local paths = elist.getPaths(
function(etype, path1, path2)
if etype == 'Delete' and string.byte(path1, -1) == 47 then
if string.byte(path1, -1) == 47 and
(etype == 'Delete' or etype == 'Create')
then
return sub(path1)..'***', sub(path2)
else
return sub(path1), sub(path2)

View File

@ -14,7 +14,7 @@ local tdir, srcdir, trgdir = mktemps()
churn(srcdir, 10)
local logs = {}
--logs = {"-log", "Delay", "-log", "Fsevents" }
logs = {"-log", "Delay", "-log", "Fsevents" }
local pid = spawn("./lsyncd", "-nodaemon", "-delay", "5",
"-rsync", srcdir, trgdir, unpack(logs))