This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

getcwd() and sysdrive


	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@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]