My own unix permissions handling attribute "ds:chmod" works,
BUT the execute bit is then overwritten by the "mtn:execute" handler,
So I want to override the default handler for "mtn:execute" to respect
both attributes,
Ideally something like:
attr_functions["mtn:execute"] =
function(filename, value)
if (GET_ATTR(filename, "ds:chmod") ~=nil) then -- ????
return execute(string.format("chmod %s %s", value, filename))
end
-- Continue like normal "mtn:execute"...
if (value == "true") then
set_executable(filename)
else
clear_executable(filename)
end
end
Many thanks in advance,
./ddd
-- Simple `chmod` handler
attr_functions["ds:chmod"] =
function(filename, value)
if value == nil then
return nil
end
return execute(string.format("chmod %s %s", value, filename))
end