File finder ignores hidden files #637

Closed
OrdinaryMagician opened this Issue Oct 20, 2015 · 4 comments

Projects

None yet

3 participants

@OrdinaryMagician

I notice this in one of the endings in .flow, the player fails to find the ".flowbeet" music file. It's there, I can confirm it.

Maybe it just can't because it's a dotfile and as such it's considered hidden.

@fdelapena
Member

Thank you for the report. I guess the problem is filefinder.cpp line 557:

if (ent->d_name[0] == '.') { continue; }

I'm not sure if dirent detects the current dir as ".", however in case of this, just by adding an additional d_name length check condition should be enough. I'm not sure if a string comparison might be slower.

@fdelapena fdelapena added this to the 0.4 milestone Oct 20, 2015
@Ghabry
Member
Ghabry commented Oct 20, 2015

Each directory contains current and parent, so only ignoring "." and ".." should be save

@fdelapena
Member

Hopefully fixed and ready to merge.

@fdelapena fdelapena closed this in a6dac70 Oct 20, 2015
@OrdinaryMagician

That looked like a pretty terrible catch-all, glad it's fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment