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

Add ReadDir function to list local files #1204

Closed
wants to merge 1 commit into from

Conversation

rustyoz
Copy link
Contributor

@rustyoz rustyoz commented Jun 12, 2015

Adds functionality wanted by @Lynxiayel in this community post

@spf13
Copy link
Contributor

spf13 commented Jun 12, 2015

Can you add a test for this?

@rustyoz
Copy link
Contributor Author

rustyoz commented Jun 12, 2015

I honestly don't know how I would do that progammatically.
The addition to the docs includes a shortcode that is used in the documentation that uses the command. The command is passed a string with a forward slash included and this works fine on Windows.

At the moment all I can do is say that it has worked for me on both windows and linux with forward and backward slashes used in the path.

@bep
Copy link
Member

bep commented Jun 12, 2015

@rustyoz: This looks fine, but as it is now it is possible to navigate outside the WorkDir. This may sound innocent, and it mostly is, but one could imagine a theme author doing something stupid.

So some thightening of that issue would be nice.

@rustyoz
Copy link
Contributor Author

rustyoz commented Jun 13, 2015

I have updated the commit to include a test for parent directory markers ".." which should prevent navigation outside of the working directory

@rustyoz rustyoz force-pushed the ReadDir branch 2 times, most recently from 9394588 to f951eb0 Compare June 26, 2015 10:30
@bep
Copy link
Member

bep commented Jun 26, 2015

@rustyoz I haven't forgotten this. I want this feature. Just want some other to chime on to evaluate if the ".." check is protection good enough.

@spf13

others?

@rustyoz
Copy link
Contributor Author

rustyoz commented Jun 27, 2015

All good. It seems like the appveyor test failure was due to a missing newline of all things.

@bep
Copy link
Member

bep commented Jul 25, 2015

Merged in 81e69c4

This is very useful. And thanks for taking the time to write some solid documentation. It's boring, but needed.

@bep bep closed this Jul 25, 2015
@github-actions
Copy link

github-actions bot commented Mar 1, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants