refuse to delete frozen definitions
This commit is contained in:
parent
01be5ccd9d
commit
bda9ceccf6
4
live.lua
4
live.lua
|
@ -160,6 +160,10 @@ function live.run(buf)
|
|||
live.send_to_driver(json.encode(Live.filename))
|
||||
elseif cmd == 'DELETE' then
|
||||
local definition_name = buf:match('^%s*%S+%s+(%S+)')
|
||||
if Live.frozen_definitions[definition_name] then
|
||||
live.send_to_driver('ERROR definition '..definition_name..' is part of Freewheeling infrastructure and cannot be deleted.')
|
||||
return
|
||||
end
|
||||
if Live.filename[definition_name] then
|
||||
local index = table.find(Live.filenames_to_load, Live.filename[definition_name])
|
||||
table.remove(Live.filenames_to_load, index)
|
||||
|
|
Loading…
Reference in New Issue