Now it works with relative paths

This commit is contained in:
Casey 2023-12-21 21:47:32 +03:00
parent cea17fc255
commit bd3b8b810c
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
1 changed files with 4 additions and 1 deletions

View File

@ -18,10 +18,13 @@ if #args == 0 then
return
end
local curdir = shell.dir()
while true do
local shall_run = false
for name, modtime in pairs(modtimes) do
local modtime_new = fs.attributes(name).modified
local path = name:sub(1,1) == "/" and name or (curdir .. "/" .. name)
local modtime_new = fs.attributes(path).modified
if modtime_new ~= modtime then
shall_run = true
modtimes[name] = modtime_new