From e15256418535b388e297a2958086da2a9e1d5dc9 Mon Sep 17 00:00:00 2001 From: Axel Kittenberger Date: Sat, 11 Dec 2010 18:54:10 +0000 Subject: [PATCH] fixing new concern inotfy optimization --- lsyncd.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lsyncd.lua b/lsyncd.lua index ca1c8dd..1a12bf8 100644 --- a/lsyncd.lua +++ b/lsyncd.lua @@ -1033,13 +1033,12 @@ local Sync = (function() -- local function concerns(self, path) -- not concerned if watch rootdir doesnt match - if not self.source:starts(path) then + if not path:starts(self.source) then return false end -print("subdirtest", path:sub(#self.source, -1)) -- a sub dir and not concerned about subdirs - if self.config.subdirs ~= nil and not self.config.subdirs and + if self.config.subdirs == false and path:sub(#self.source, -1):match("[^/]+/?") then return false