[fsync] Check whether API_PATH actually exists and contains any symlinks. Thanks Mario!
This commit is contained in:
parent
068040a4b4
commit
69d7922dab
|
@ -318,8 +318,10 @@ end
|
||||||
--- Remove all /sensor/xyz endpoint mappings to the cgi script.
|
--- Remove all /sensor/xyz endpoint mappings to the cgi script.
|
||||||
-- @return none
|
-- @return none
|
||||||
local function remove_symlinks()
|
local function remove_symlinks()
|
||||||
for symlink in nixio.fs.dir(API_PATH) do
|
if nixio.fs.dir(API_PATH) then
|
||||||
nixio.fs.unlink(API_PATH .. symlink)
|
for symlink in nixio.fs.dir(API_PATH) do
|
||||||
|
nixio.fs.unlink(API_PATH .. symlink)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue