From 67066fc93a8cd6035ca0183ce7d7962090958db8 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Wed, 1 Jun 2022 18:36:00 -0400 Subject: [PATCH] Added in defaults for dirwatch. --- data/core/dirwatch.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/core/dirwatch.lua b/data/core/dirwatch.lua index fcbd019d..5553047d 100644 --- a/data/core/dirwatch.lua +++ b/data/core/dirwatch.lua @@ -110,8 +110,8 @@ function dirwatch:check(change_callback, scan_time, wait_time) self.scanned[directory] = new_modified end end - if system.get_time() - start_time > scan_time then - coroutine.yield(wait_time) + if system.get_time() - start_time > (scan_time or 0.01) then + coroutine.yield(wait_time or 0.01) start_time = system.get_time() end end