mirror of https://github.com/octoleo/lsyncd.git
This commit is contained in:
parent
a0ab850ec0
commit
288f09ad01
|
@ -1,4 +1,7 @@
|
||||||
2017-01-05: 2.1.1
|
????-??-??: 2.2.2
|
||||||
|
fix: checkgauge 'insist'
|
||||||
|
|
||||||
|
2017-01-05: 2.2.1
|
||||||
enhancement: now always using filter lists with rysnc
|
enhancement: now always using filter lists with rysnc
|
||||||
instead of include/exclude lists taking advantage of the new --delete-missing-args
|
instead of include/exclude lists taking advantage of the new --delete-missing-args
|
||||||
parameter to delete files on target.
|
parameter to delete files on target.
|
||||||
|
|
20
lsyncd.lua
20
lsyncd.lua
|
@ -88,7 +88,7 @@ local settingsCheckgauge =
|
||||||
statusInterval = true,
|
statusInterval = true,
|
||||||
logfacility = true,
|
logfacility = true,
|
||||||
logident = true,
|
logident = true,
|
||||||
insisit = true,
|
insist = true,
|
||||||
inotifyMode = true,
|
inotifyMode = true,
|
||||||
maxProcesses = true,
|
maxProcesses = true,
|
||||||
maxDelays = true,
|
maxDelays = true,
|
||||||
|
@ -2091,9 +2091,8 @@ local Sync = ( function
|
||||||
end
|
end
|
||||||
|
|
||||||
-- a sub dir and not concerned about subdirs
|
-- a sub dir and not concerned about subdirs
|
||||||
if
|
if self.config.subdirs == false
|
||||||
self.config.subdirs == false
|
and path:sub( #self.source, -1 ):match( '[^/]+/?' )
|
||||||
and path:sub( #self.source, -1 ):match( '[^/]+/?' )
|
|
||||||
then
|
then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -2297,7 +2296,7 @@ local Sync = ( function
|
||||||
if not path2
|
if not path2
|
||||||
then
|
then
|
||||||
-- simple test for single path events
|
-- simple test for single path events
|
||||||
if self.excludes:test(path)
|
if self.excludes:test( path )
|
||||||
then
|
then
|
||||||
log(
|
log(
|
||||||
'Exclude',
|
'Exclude',
|
||||||
|
@ -3174,7 +3173,9 @@ local Syncs = ( function
|
||||||
-- Tests if any sync is interested in a path.
|
-- Tests if any sync is interested in a path.
|
||||||
--
|
--
|
||||||
local function concerns
|
local function concerns
|
||||||
( path )
|
(
|
||||||
|
path
|
||||||
|
)
|
||||||
for _, s in ipairs( syncsList )
|
for _, s in ipairs( syncsList )
|
||||||
do
|
do
|
||||||
if s:concerns( path )
|
if s:concerns( path )
|
||||||
|
@ -3286,9 +3287,9 @@ local Inotify = ( function
|
||||||
)
|
)
|
||||||
log( 'Function', 'Inotify.addWatch( ', path, ' )' )
|
log( 'Function', 'Inotify.addWatch( ', path, ' )' )
|
||||||
|
|
||||||
if not Syncs.concerns(path)
|
if not Syncs.concerns( path )
|
||||||
then
|
then
|
||||||
log('Inotify', 'not concerning "',path,'"')
|
log('Inotify', 'not concerning "', path, '"')
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -3296,11 +3297,12 @@ local Inotify = ( function
|
||||||
-- registers the watch
|
-- registers the watch
|
||||||
local inotifyMode = ( uSettings and uSettings.inotifyMode ) or '';
|
local inotifyMode = ( uSettings and uSettings.inotifyMode ) or '';
|
||||||
|
|
||||||
local wd = lsyncd.inotify.addwatch( path, inotifyMode) ;
|
local wd = lsyncd.inotify.addwatch( path, inotifyMode ) ;
|
||||||
|
|
||||||
if wd < 0
|
if wd < 0
|
||||||
then
|
then
|
||||||
log( 'Inotify','Unable to add watch "', path, '"' )
|
log( 'Inotify','Unable to add watch "', path, '"' )
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue