Message-ID: <3A36C6DF.C42AF097@averstar.com> Date: Tue, 12 Dec 2000 19:46:23 -0500 From: George Snyder Organization: AverStar, Inc. X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp CC: Eli Zaretskii , djgpp AT delorie DOT com Subject: Re: Current Directory Switches to Short Format on NT References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com > ... > > Why is it important what does the shell prompt display? What's > important is what do library functions such as `getcwd' report. Can > you check what does `getcwd' return when you have ntlfn loaded? I wrote a trivial program which prints the result of getcwd(), built with MS Dev Studio 6.0, and added it to the previous example. The first call returns the long directory path as expected; the call after "ls.exe" returns the short form: E:\Program Files > E:\gjs\C\Experiments\getcwd\Debug\getcwd.exe getcwd = 'E:\Program Files' E:\Program Files > E:\gjs\gnu\bin\ls AverStar Microsoft Visual Studio seti Java RadView Jikes Visigenic E:\PROGRA~1 > E:\gjs\C\Experiments\getcwd\Debug\getcwd.exe getcwd = 'E:\PROGRA~1' > > After this, programs which read the current directory name can go > > wrong. For example, a licensed CM program which gets the current > > directory name and looks that up in a database fails, because the > > database lists the long filename format. > > If this indeed happens, it might be a bug in ntlfn, so please provide > a short test program which exhibits the problem. Here's the trivial source code: #include #include int main(int argc, char* argv[]) { char buffer[101]; if (getcwd(buffer, 100) != NULL) { printf("getcwd = '%s'\n", buffer); return 0; } else { printf("getcwd failed\n"); return 1; } } The executable is available at http://www.averstar.com/~gjs/tmp/getcwd.exe. > > Are 32-bit executable versions of the v2gnu programs available? > The FAQ has a pointer to the Cygwin ports in section 3.6. Thanks for the pointer. -- George Snyder