Engine.js fails with subdirectory in views dir #3

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@imperez

imperez commented Sep 23, 2012

I noticed when I was organizing some views in engine.js kept failing when trying to call a readFile on it. So I added some code to check for a directory and if so runs the callback with an empty content.

I'm not too sure if this solution is completely best since I don't know the inner workings of the framework but everything seems to be working again on my side.

Give it a look and let me know what you think.

@Grigore147

This comment has been minimized.

Show comment Hide comment
@Grigore147

Grigore147 Sep 23, 2012

Owner

Oh that was my mistake after refactoring, didn't test enough.

So i've fixed with: if (file.isdir) { return cb(); }.
Now directories are just ignored and at the same time allow files with the same name as directories.

Thanks for report.

Owner

Grigore147 commented Sep 23, 2012

Oh that was my mistake after refactoring, didn't test enough.

So i've fixed with: if (file.isdir) { return cb(); }.
Now directories are just ignored and at the same time allow files with the same name as directories.

Thanks for report.

@Grigore147 Grigore147 closed this Sep 23, 2012

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