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

scandir picks up hidden system files #30

Closed
yellowled opened this issue Dec 16, 2015 · 3 comments
Closed

scandir picks up hidden system files #30

yellowled opened this issue Dec 16, 2015 · 3 comments

Comments

@yellowled
Copy link

Most Unix-/Linux-type operating systems (including OS X) produce hidden system files usually starting with a dot in the file's name (e.g. the infamous .DS_Store on OS X). PHP's scandir picks these up as well, but they are not excluded by if ($file != '.' && $file != '..') in functions.php.

Ideally, the *FilesInFolder functions should probably exclude any file name that starts with a ..

@bjankord
Copy link
Owner

Agreed, will plan on adding this over the weekend.

@bjankord
Copy link
Owner

Thanks @yellowled. Added a .DS_Store file to the markup directory and sure enough, it was being picked up by scandir and was not filtered out by the if statement.

I've updated the scandir check to skip files that start with a .

@yellowled
Copy link
Author

👍

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