From 1c299c14ddc5f1f1adce69adea55c99a6aacf6e5 Mon Sep 17 00:00:00 2001 From: Axel Kittenberger Date: Fri, 7 Jun 2013 14:09:57 +0200 Subject: [PATCH] checking delay to a number > 0 --- lsyncd.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lsyncd.lua b/lsyncd.lua index 527210b..e643edf 100644 --- a/lsyncd.lua +++ b/lsyncd.lua @@ -2111,6 +2111,16 @@ local Sync = ( function( ) end end + if + config.delay ~= nil and + ( + type(config.delay) ~= 'number' or + config.delay < 0 + ) + then + error( 'delay must be a number and >= 0', 2 ) + end + if config.excludeFrom then s.excludes:loadFile( config.excludeFrom ) end