Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_Scripting: ignore hidden Lua files #27425

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

tpwrules
Copy link
Contributor

On macOS, sometimes ._script.lua is created to store metadata when the user copies script.lua over to their SD card. Previously, the scripting engine would barf since the file is not Lua. Now, these files are ignored.

Also avoids a case where a hidden and valid script might be loaded without the user's knowledge.

Tested on SITL that a hidden file is rejected and non hidden files are still loaded.

On macOS, sometimes ._script.lua is created to store metadata when the
user copies script.lua over to their SD card. Previously, the scripting
engine would barf since the file is not Lua. Now, these files are
ignored.

Also avoids a case where a hidden and valid script might be loaded
without the user's knowledge.
@tpwrules tpwrules requested a review from IamPete1 June 30, 2024 17:23
Copy link
Member

@IamPete1 IamPete1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have never hit this, but it seems like reasonable precaution.

@tpwrules
Copy link
Contributor Author

I have seen at least one user seeking help on the Discord because they hit the problem with macOS independently.

@tridge tridge merged commit 717c5ff into ArduPilot:master Jul 2, 2024
92 checks passed
@tpwrules tpwrules deleted the pr/lua-ignore-hidden branch July 2, 2024 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants