This repository has been archived on 2020-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
macaron/fixtures
Valérian Galliat d70460e68c allow symlink as template directory
This commit calls `filepath.EvalSymlinks` before `filepath.Walk` in the
initialization of the template file system in order to allow it to be a
symlink. Otherwise `filepath.Walk` would just yield the symlink itself,
resulting in undefined templates.

This does not allow to use symlinks **inside** the template directory.

The error handling changes may look odd at first sight but it behaves
as before; previously if `opt.Directory` was not an existing file,
`filepath.Walk` would call the callback with the same unexisting
directory as `path` plus an error (the error being ignored).
`filepath.Rel` would not error on this, and the rest of the function
would just do nothing provided that the unexisting directory does not
have a known extension.

Now in case of an error with `filepath.EvalSymlinks`, the rest of the
function is just skipped (and as a side effect preventing potential
errors when the unexisting directory have a known extension).
2016-01-11 12:36:54 -05:00
..
basic More helper methods 2014-11-06 23:00:57 -05:00
basic2 More helper methods 2014-11-06 23:00:57 -05:00
custom_funcs fix test cases on windows 2014-11-06 03:29:22 -05:00
symlink allow symlink as template directory 2016-01-11 12:36:54 -05:00