This is the mail archive of the
mailing list for the Cygwin project.
Re: Patch for path.cc & environ.cc
- To: John Paulson <munch at powertv dot com>
- Subject: Re: Patch for path.cc & environ.cc
- From: Carl Thompson <cet at carlthompson dot net>
- Date: Mon, 12 Jun 2000 18:54:16 -0700
- Cc: Cygwin List <cygwin at sourceware dot cygnus dot com>
- References: <220.127.116.1100612181028.00b48990@mailhost>
John Paulson wrote:
> I _can't_ be the only user of cygwin running into the problem of
> mixed directory separators in pathnames. And in the position that
> remedying the source of mixed slashes is way more difficult than
> modifying cygwin.
If I am understanding you, there must be lots of software that suffers from
the same problem. Think of all that Unix code that does something like
char datafile[MAXPATHLEN] = "";
const char* home = getenv("HOME");
if (home) strncpy(datafile, home, sizeof(datafile));
strncat(datafile, "/.GnomoVision/config", sizeof(datafile));
[ Do something with filename ]
If I understand correctly, wouldn't this run afoul of the problem if
the "HOME" environment variable were something like "C:\My Documents" ? Or
am I not getting it?
> John Paulson
Want to unsubscribe from this list?
Send a message to firstname.lastname@example.org