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

Should content/symlink_to_dir be followed ? #299

Closed
jokester opened this issue Apr 2, 2013 · 4 comments
Closed

Should content/symlink_to_dir be followed ? #299

jokester opened this issue Apr 2, 2013 · 4 comments

Comments

@jokester
Copy link

@jokester jokester commented Apr 2, 2013

I am using nanoc3.6.2 with ruby2.0 under linux.

Symbolic link to directory under content/ are not counted, due to ruby's Dir[] here.

Should it be followed as symlink_to_file is? It would be convenience if I can ln -s '../vendor/xxx' content/xxx

Not completely tested, but

- Dir[dir_name + '/**/*']
+ Dir[dir_name + '{,**/*}/**/*']

seems to work, by following symlink of dir at most once.

@ddfreyne
Copy link
Member

@ddfreyne ddfreyne commented Apr 2, 2013

nanoc doesn’t follow symlinks but it definitely should.

The fix you give may work for a single indirection, but I’d ideally like multiple indirections (with a fixed limit so it doesn’t recurse indefinitely). It’s on the to-do list for nanoc 3.6.x!

@jokester
Copy link
Author

@jokester jokester commented Apr 2, 2013

@ddfreyne

Glad to know it's going to be improved. Will just use the patch locally before that.

@jokester
Copy link
Author

@jokester jokester commented Apr 2, 2013

Made #all_split_files_in follow symlink for up to 10 times, in pull request #300 .

@ddfreyne
Copy link
Member

@ddfreyne ddfreyne commented Apr 10, 2013

Implemented in #302.

@ddfreyne ddfreyne closed this Apr 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants