I'm trying to strip a certain prefix from a pathname, e.g. removing
/tmp from /tmp/foo/bar would give foo/bar.
With CLISP, this works:
CL-USER> (translate-pathname #P"/tmp/foo/bar"
(make-pathname :directory '(:absolute "tmp" :wild-inferiors)
:name :wild :type :wild :version :wild)
(make-pathname :directory '(:relative :wild-inferiors)
:name :wild :type :wild :version :wild))
#P"foo/bar"
But with SBCL 1.0.2.19, I get an absolute path, which is not as
useful:
CL-USER> (translate-pathname #P"/tmp/foo/bar"
(make-pathname :directory '(:absolute "tmp" :wild-inferiors)
:name :wild :type :wild :version :wild)
(make-pathname :directory '(:relative :wild-inferiors)
:name :wild :type :wild :version :wild))
#P"/foo/bar"
Am I missing something? Is this a bug or a feature?
Magnus
|