From: crvich AT raleigh DOT ibm DOT com (Ernest Crvich) Subject: getcwd() and sysdrive 15 May 1997 21:32:28 -0700 Sender: mail AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <9705151616.AA44472.cygnus.gnu-win32@ode1.raleigh.ibm.com> Original-To: GNU-Win32 AT cygnus DOT com (Cygnus Discussion) X-Mailer: ELM [version 2.4 PL22] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Original-Sender: owner-gnu-win32 AT cygnus DOT com I just noticed that getcwd() doesn't return the drive in the path for the system drive (e.g., if C: is the sysdrive and you're in \DIR, getcwd() returns "/DIR"). Furthermore, if you're in the root directory of the system drive, it returns the empty string (rather than "/" or "//C/"). For other [network] drives, it works as expected, and returns the form "//W/DIR" and "//W/" for the above tests. This behavior is identical on b17.1 and b18 (on WinNT 4.0), so maybe I'm just expecting too much out of getcwd(). 8-) Fortunately, the Windows function GetCurrentDirectory[AW]() always returns the drive and path correctly, and so is a viable alternative [at least for my purposes]. - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".