GNU bug report logs - #36416
realpath doesn't preserve '//' in -m mode

Previous Next

Package: coreutils;

Reported by: L A Walsh <coreutils <at> tlinx.org>

Date: Fri, 28 Jun 2019 12:54:02 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


Message #15 received at control <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: control <at> debbugs.gnu.org
Subject: Re: bug#36416: realpath doesn't preserve '//' in -m mode
Date: Fri, 28 Jun 2019 14:03:05 -0500
[Message part 1 (text/plain, inline)]
tag 36416 notabug
close 36416
thanks

On 6/28/19 6:11 AM, L A Walsh wrote:
> realpath -m //sysname/rootdir/.
> returns "/sysname/rootdir"  This is incorrect, according to POSIX.
> 
> and #3-4 have specific meanings in various applications that  in usage.
> 
> 1) leading double slashes are to be preserved
>    My Notes:  in combining paths like pathcat(//, sys, /a) =>
>     should get //sys/a
>               in combining paths like pathcat(//, /sys, /a) => /sys sys
> specifies it wants to be directory, not a system., so at root, '//' refer to
> no system, and we just get: '/sys/a'
> 
> 2) final slash indicates end node is a directory
> 
> 3) a final . in a source specifies something under the directory name.
> 
> ~4?)  I don't think /.. at end of a pathname can be safely deleted
> and have same meaning as without it, but brain is too tired to detail
> right now.
> 
> 
> 
> 
> 
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 6 years and 22 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.