LUA Scripts Can Not Be Symbolic Links

Moderator: leecollings

Post Reply
Daiii
Posts: 13
Joined: Saturday 12 August 2017 0:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: New Hampshire, USA
Contact:

LUA Scripts Can Not Be Symbolic Links

Post by Daiii »

Scripts in the scripts/lua directory will not be invoked if they are symbolic (soft) links. Rather, the script files must be actual ordinary files.

This policy seems to be implemented in Helper.cpp, called from EvaluateEvent() -> DirectoryListing() -> dirent_is_file()

Code: Select all

bool dirent_is_file(std::string dir, struct dirent *ent)
{
  if (ent->d_type == DT_REG)
    return true;
  return false;
}
Was this intentional, perhaps as a sanity check on autorun files? It would seem handy if we could symlink the script files so that the working versions could be maintained outside of the Domoticz tree. This would allow multiple versions of Domoticz to be present using a single set of script files, along with clobber-free updates, etc.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest