darktable-org / lua-scripts

151 stars 110 forks source link

script_manager has problems with folders that contain '-' and '.' #420

Closed wpferguson closed 1 year ago

wpferguson commented 1 year ago

there is one limitation: If you use script manager to start this script: After extracting the release archive, please rename the installation folder, remove the last digits:

examples/Darktable-Initial-Workflow-Module-1.2.0 to examples/Darktable-Initial-Workflow-Module

It seems, script manager does not like these special characters…

wpferguson commented 1 year ago

script_manager isn't built to handle nested directories, though the lua search path seems to take over and handle it just fine when there aren't any dashes or dots in the path.

wpferguson commented 1 year ago

After some research I discovered deep in the Lua documentation that dot is not an allowable character in a folder name. When the Lua package loader tries to find the package and load it, it substitutes / for ., so Darktable-Initial-Workflow-Module-1.2.0 becomes Darktable-Initial-Workflow-Module-1/2/0 and thus the module is never found.