Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: From: "Schaible, Jorg" To: cygwin AT sources DOT redhat DOT com Cc: cygwin-patches AT sources DOT redhat DOT com Subject: RE: check_case:strict / cygpath Date: Mon, 6 Aug 2001 15:40:01 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain Hi Gerrit, it seems this is hard-coded by Windows (at least for my W2k). cygpath just calls WIn-API GetSystemDirectory. I've provided a patch for this scenario. Greetings, Jorg 2001-08-06 Joerg Schaible * cygpath.cc (main): Support -w for Windows (System) directories and return physical correct orthography for the Windows System dir. --- cygpath.cc-orig Mon Aug 6 13:32:29 2001 +++ cygpath.cc Mon Aug 6 13:24:11 2001 @@ -208,6 +208,7 @@ main (int argc, char **argv) int options_from_file_flag; char *filename; char buf[MAX_PATH], buf2[MAX_PATH]; + WIN32_FIND_DATA w32_fd; prog_name = strrchr (argv[0], '/'); if (prog_name == NULL) @@ -266,13 +267,21 @@ main (int argc, char **argv) case 'W': GetWindowsDirectory(buf, MAX_PATH); - cygwin_conv_to_posix_path(buf, buf2); + if (!windows_flag) + cygwin_conv_to_posix_path(buf, buf2); + else + strcpy(buf2, buf); printf("%s\n", buf2); exit(0); case 'S': GetSystemDirectory(buf, MAX_PATH); - cygwin_conv_to_posix_path(buf, buf2); + FindFirstFile(buf, &w32_fd); + strcpy(strrchr(buf, '\\')+1, w32_fd.cFileName); + if (!windows_flag) + cygwin_conv_to_posix_path(buf, buf2); + else + strcpy(buf2, buf); printf("%s\n", buf2); exit(0); >-----Original Message----- >From: Gerrit P. Haase [mailto:haase AT convey DOT de] >Sent: Thursday, August 02, 2001 7:29 PM >To: cygwin AT sources DOT redhat DOT com >Subject: check_case:strict / cygpath > > >Hi, > >cygpath reports the following to me: > >$ cygpath -u -S >/cygdrive/c/WINNT/System32 > >But my Sysdir is named not 'System32', but 'system32' . > >Is this a bug? > >gph > > >-- >gerrit DOT haase AT convey DOT de > >-- >Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple >Bug reporting: http://cygwin.com/bugs.html >Documentation: http://cygwin.com/docs.html >FAQ: http://cygwin.com/faq/ > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/