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

Expand symbolic linked folders #640

Closed
wants to merge 1 commit into from
Closed

Conversation

garie
Copy link

@garie garie commented Jan 27, 2016

When expanding folders, also expand symbolic links.
Fixes #631.

When expanding folders, also expand symbolic links.
Fixes senchalabs#631.
@@ -33,7 +33,7 @@ def expand_filename(fname)

if File.exists?(fname)
if File.directory?(fname)
Dir[fname+"/**/*.{js,scss}"].each {|f| files << f }
Dir.glob([fname+"/**{,/*/**}/*.{js,scss}"],0).each {|f| files << f }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch, but I don't quite understand this code.

  • What's the significance of the 0 for flags parameter? To my understanding it's the same as passing no flags.
  • Why are we calling Dir.glob() with an array of one string, instead of just the string itself?
  • What's the trick with {,/*/**} ?

Nothing in Dir.glob() docs really explained this to me.

@garie garie closed this Mar 29, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants