9253 – on win32, java.io.File.listFiles("C:\") returns pwd instead of the root content of C: (original) (raw)

Bug 9253 - on win32, java.io.File.listFiles("C:\\") returns pwd instead of the root content of C:

Summary: on win32, java.io.File.listFiles("C:\\") returns pwd instead of the root cont...

| Status: RESOLVED FIXED Alias: None Product: gcc Classification: Unclassified Component: java (show other bugs) Version: unknown Importance: P3 normal Target Milestone: --- Assignee: Tom Tromey URL: Keywords: Depends on: Blocks: | | Reported: 2003-01-09 11:46 UTC by erik.poupaert Modified: 2003-07-25 17:33 UTC (History) CC List: 2 users (show) See Also: Host: Target: Build: Known to work: Known to fail: Last reconfirmed: | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | | |

| Attachments Add an attachment (proposed patch, testcase, etc.) Note You need tolog in before you can comment on or make changes to this bug. | | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |

| Description erik.poupaert 2003-01-09 11:46:00 UTC import java.io.File; public class TestFileList { public static void main(String args[]) { File file=new File("C:\\"); File[] list = file.listFiles(); //displays the list of pwd and not of C:\\ for(int i=0;i<list.length;i++) { System.out.println(list[i].getName()); } } } Release: unknown Environment: win32 How-To-Repeat: See example source Comment 1 Tom Tromey 2003-01-24 21:53:16 UTC Responsible-Changed-From-To: unassigned->tromey Responsible-Changed-Why: I'm handling the administrivia Comment 2 Tom Tromey 2003-01-24 21:53:16 UTC State-Changed-From-To: open->closed State-Changed-Why: I'm checking in the patch. Comment 3 Tom Tromey 2003-01-24 21:57:00 UTC From: tromey@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: java/9253 Date: 24 Jan 2003 21:57:00 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: tromey@gcc.gnu.org 2003-01-24 21:57:00 Modified files: libjava : ChangeLog libjava/java/io: natFileWin32.cc Log message: 2003-01-24 Ranjit Mathew <rmathew@hotmail.com> Fixes [PR java/9253](show%5Fbug.cgi?id=9253 "RESOLVED FIXED - on win32, java.io.File.listFiles("C:\") returns pwd instead of the root content of C:"): * java/io/natFileWin32.cc (performList): Append only "*.*" if the canonical file path already has a "\" at the end. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.1642&r2=1.1643 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/io/natFileWin32.cc.diff?cvsroot=gcc&r1=1.12&r2=1.13 Comment 4 Tom Tromey 2003-01-24 21:57:41 UTC From: tromey@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: java/9253 Date: 24 Jan 2003 21:57:41 -0000 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: tromey@gcc.gnu.org 2003-01-24 21:57:41 Modified files: libjava : ChangeLog libjava/java/io: natFileWin32.cc Log message: 2003-01-24 Ranjit Mathew <rmathew@hotmail.com> Fixes [PR java/9253](show%5Fbug.cgi?id=9253 "RESOLVED FIXED - on win32, java.io.File.listFiles("C:\") returns pwd instead of the root content of C:"): * java/io/natFileWin32.cc (performList): Append only "*.*" if the canonical file path already has a "\" at the end. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.1594.2.45&r2=1.1594.2.46 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/io/natFileWin32.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.11.4.1&r2=1.11.4.2 | | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |