[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `readlink -f` and trailing slash
From: |
Eric Blake |
Subject: |
Re: `readlink -f` and trailing slash |
Date: |
Tue, 28 Aug 2012 22:57:41 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
On 08/28/2012 04:23 PM, Todd Partridge wrote:
Thanks for the report. However,
> Would it be possible to append a
> trailing slash to `readlink -f` for those that specify that when then
> type it? e.g. `readlink -f libtool/` would return
> `/usr/share/libtool/` rather than `/usr/share/libtool`.
I'm afraid this is not possible. 'readlink -f' mirrors the behavior of
the realpath(3) function (and its counterpart canonicalize_file_name()
wrapper in glibc), and POSIX requires realpath() to strip trailing slashes.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature