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

'Loader.File.Find' not correctly matching wildcards for 'file.Find' #6

Open
CaveeJohnson opened this issue Aug 6, 2017 · 1 comment

Comments

@CaveeJohnson
Copy link

Example code from a packed addon:

file.Find("somedir/*_theme.lua", "LUA")

-- Result
{
    [1] = "revenge_element.lua",
    [2] = "depthhud_classic_element.lua",
    [3] = "depthhud_classic_theme.lua",
    [4] = "revenge_theme.lua",
}

will match as if the code were

file.Find("somedir/*.lua", "LUA")

Problem lies here
https://github.com/notcake/glib/blob/master/lua/glib/loader/loader.lua#L41-L59

but is likely caused here
https://github.com/notcake/glib/blob/master/lua/glib/loader/packfilesystem.lua#L36-L53

I would make a pull request but I am unfamiliar with your code style and do not want to dirty the codebase.
Substituting * for .* and pattern matching the name should work.

Thanks!

@notcake
Copy link
Owner

notcake commented Aug 6, 2017

This library is deprecated and I recommend avoiding using it,

but you're free to make pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants