diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2019-06-01 04:15:04 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2019-06-01 06:21:54 +0200 |
| commit | 92791a3fe15bb2d5c14039fbd531be73255f0c6d (patch) | |
| tree | e9e103fa96678705797b906b69fdeee90b6a753f /tests/symlink | |
| parent | f60f05c0ea0fcd0557b4e8f29f3b9d9471d011dd (diff) | |
Fix obscure crash with rsource and $srctree pointing to a symlink
Sourcing a file with an absolute path and using rsource in it triggered
a relpath() between the absolute path and $srctree. Since e.g.
symlink/../bar/ = bar/ is not guaranteed for symlinks, this could lead
to the rsource'd file not being found if $srctree pointed to a symlink.
Switch to a simpler, more textual method for stripping $srctree from
glob results, which should be robust against symlink shenanigans. This
also makes the code a bit easier to follow.
Discovered by Marc Herbert.
Piggyback some minor cleanup.
Diffstat (limited to 'tests/symlink')
| l--------- | tests/symlink | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/symlink b/tests/symlink new file mode 120000 index 0000000..565623e --- /dev/null +++ b/tests/symlink @@ -0,0 +1 @@ +sub/sub
\ No newline at end of file |
