forked from hkc/cc-stuff
Now it works with relative paths
This commit is contained in:
parent
cea17fc255
commit
bd3b8b810c
|
@ -18,10 +18,13 @@ if #args == 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local curdir = shell.dir()
|
||||||
|
|
||||||
while true do
|
while true do
|
||||||
local shall_run = false
|
local shall_run = false
|
||||||
for name, modtime in pairs(modtimes) do
|
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
|
if modtime_new ~= modtime then
|
||||||
shall_run = true
|
shall_run = true
|
||||||
modtimes[name] = modtime_new
|
modtimes[name] = modtime_new
|
||||||
|
|
Loading…
Reference in New Issue