summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtx-watch.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-03-15 16:04:31 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-03-15 16:04:31 +0100
commita4e07f30e880ab27c2918f81f136e257475b7729 (patch)
tree02db002d3001a49777a049f9a98fdc872a5e1ad1 /scripts/context/lua/mtx-watch.lua
parentcbc37c39432e0ebe38e0922fc6d14c2955ab3ba2 (diff)
downloadcontext-a4e07f30e880ab27c2918f81f136e257475b7729.tar.gz
2018-03-15 15:36:00
Diffstat (limited to 'scripts/context/lua/mtx-watch.lua')
-rw-r--r--scripts/context/lua/mtx-watch.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/context/lua/mtx-watch.lua b/scripts/context/lua/mtx-watch.lua
index 95323f571..8629058e5 100644
--- a/scripts/context/lua/mtx-watch.lua
+++ b/scripts/context/lua/mtx-watch.lua
@@ -167,6 +167,7 @@ function scripts.watch.watch()
lfs.chdir(path)
local files = { }
glob(files,path)
+ glob(files,".")
table.sort(files,filenamesort)
-- for name, time in next, files do
for i=1,#files do
@@ -176,6 +177,7 @@ function scripts.watch.watch()
local name = joinname(dirname,basename)
--~ local ok, joblog = xpcall(function() return dofile(name) end, function() end )
local ok, joblog = pcall(dofile,name)
+report("checking file %s/%s: %s",dirname,basename,ok and "okay" or "skipped")
if ok and joblog then
if joblog.status == "processing" then
report("aborted job, %s added to queue",name)
@@ -399,7 +401,9 @@ function scripts.watch.cleanup_stale_files() -- removes duplicates
elseif not delay then
report("missing --cleanup=delay")
else
- report("dryrun, use --force for real cleanup")
+ if not force then
+ report("dryrun, use --force for real cleanup")
+ end
local files = dir.glob(file.join(path,"*"))
local rtime = time()
for i=1,#files do