Closed edwinvdgraaf closed 8 years ago
How can this "also be a file" you specifically check for File.directory?(name)
.
Code does not take into account that this name can also be a file (when passed in without extension).
Updated the code with your suggestions, hoping its more clear now.
By convention resolving a directory like '/elements/' will resolve to the index.html in this directory
=> 'elements/index.html'
when available. This is done by checking that the passed inname
infind_template
is a directory on the line altered in this commit. It does not take into account that this name can also be a file (when passed in without extension). This is an issue because most template render call work without extenstion and traverse this same code:This commits adds a check to verify that there is no file inside the parent directory with the same name.