ufront / ufront-mvc

The core MVC framework that powers ufront
MIT License
17 stars 15 forks source link

Normalize template path #38

Closed kevinresol closed 8 years ago

kevinresol commented 8 years ago

Sometimes when the view path is specified as "../another/folder/file.html" in ExampleController, the view engine will try to find the file with the path "view/example/../another/folder/file.html". If "view/example" does not exist, it will fail. So we should normalize the path to "view/another/folder/file.html" first.

jasononeil commented 8 years ago

I hadn't thought about the case where the directory doesn't exist. Thanks for the fix!