I maintain a filepath-handling library, and during some tests noticed that ABCL is over-aggressive about how it handles .. on Unix systems. In particular, it seems to be confusing the difference between :up and :back as described in the spec here.
The issue is that in general, for some given filepath, due to the possibility of symlinks, .. cannot be resolved without a filesystem probe. ABCL is not doing such a probe, but instead assuming that all .. are treated as :back. The perhaps safer thing to do is simply insert a :up where ever a .. is seen, which it seems to only being doing when the previously processed path component was not a string.
I maintain a filepath-handling library, and during some tests noticed that ABCL is over-aggressive about how it handles
..
on Unix systems. In particular, it seems to be confusing the difference between:up
and:back
as described in the spec here.The issue is that in general, for some given filepath, due to the possibility of symlinks,
..
cannot be resolved without a filesystem probe. ABCL is not doing such a probe, but instead assuming that all..
are treated as:back
. The perhaps safer thing to do is simply insert a:up
where ever a..
is seen, which it seems to only being doing when the previously processed path component was not a string.Example:
whereas I would have expected
#P"/foo/bar/.././../baz/test.json"
.Inspect output:
This occurs in calls to
pathname
and in usage of#p
pathname literals.Related https://github.com/Clozure/ccl/issues/477