This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: Fix PR/6652 on MinGW
- From: Andrew Haley <aph at redhat dot com>
- To: Mohan Embar <gnustuff at thisiscool dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: Mon, 20 Oct 2003 15:06:03 +0100
- Subject: Patch: Fix PR/6652 on MinGW
- References: <20031017203413.GA21445@mail.konqueror.de><LIGA9B6C0XVL8ROA8C0NKNJWTZWL.3f9179c8@p733>
Mohan Embar writes:
> Index: java/io/natFileWin32.cc
> ===================================================================
> RCS file: /cvs/gcc/gcc/libjava/java/io/natFileWin32.cc,v
> retrieving revision 1.17
> diff -u -2 -r1.17 natFileWin32.cc
> --- java/io/natFileWin32.cc 29 Aug 2003 04:21:00 -0000 1.17
> +++ java/io/natFileWin32.cc 18 Oct 2003 17:28:07 -0000
> @@ -110,8 +110,11 @@
> {
> JV_TEMP_UTF_STRING (cpath, path);
> +
> + const char* thepath = *cpath.buf() ? cpath.buf() : ".";
> + // "" becomes "."
>
Eeehhh.
const char* thepath = cpath.buf ();
if (thepath[0] == 0) // Perhaps (strlen(thepath) == 0) would be less obscure.
thepath = ".";
Then you don't need the comment...
Andrew.