[PATCH v6 4/4] Do not rely on `getenv ("HOME")`'s path conversion
Corinna Vinschen
corinna-cygwin@cygwin.com
Thu Apr 6 10:28:35 GMT 2023
On Apr 6 11:54, Johannes Schindelin wrote:
> On Thu, 6 Apr 2023, Corinna Vinschen wrote:
> > While the description is clear on the colon problem, shouldn't this
> > catch UNC paths as well? I. e., just check for strchr(home, '\\')?
>
> Good idea! I do not know off-hand how well things work when `HOME` is an
> UNC path, but we can fix those things when (and if) they arrive.
>
> I'll use `isdrive (home) || home[0] == '\\'` as is used elsewhere, okay?
I was thinking of simplifying this to the strchr test for backslash
because all paths with a backslash are handled as Windows paths.
Without actually checking the source, I'd guess the above is checking
for an absolute path in the first place. Hopefully everybody is
aware that HOME should be a full path... :)
But yes, your above expression is ok, too.
Corinna
More information about the Cygwin-patches
mailing list