bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bugs in dirname module


From: Paul Eggert
Subject: Re: bugs in dirname module
Date: Thu, 10 Nov 2005 17:44:07 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Eric Blake <address@hidden> writes:

> On cygwin, : can be a valid file character (cygwin has managed mounts,
> where cygwin transparently translates the names in use by the program into
> valid characters for the file system).  There, drive letters are exactly
> [A-Za-z]:, and all other leading characters (besides slashes, of course),
> are treated as a relative pathname from ./ rather than a drive designator.

This makes it sound like we cannot implement base_name using the
current approach.  Currently, base_name always returns a suffix of the
original file name.  But under Cygwin if the file name is "a:b:c",
base_name cannot return "b:c", since that does not have the desired
POSIX property that you can chdir to the dir_name and then use the
base_name.

Instead, on Cygwin base_name("a:b:c") would have to somehow return a
string like "./b:c".  But "./b:c" is problematic for two reasons:
first, it is not a single file name component; second, it's not a
suffix of the original name.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]