| delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <4689330F.3050404@mff.cuni.cz> |
| Date: | Mon, 02 Jul 2007 19:17:03 +0200 |
| From: | Pavel Kudrna <Pavel DOT Kudrna AT mff DOT cuni DOT cz> |
| User-Agent: | Thunderbird 1.5 (Windows/20051201) |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | bug in cygwin_conv_to_posix_path() caused by period in win32 path |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
Hi,
the legal win32 paths containing period like "c:.\" or "c:." are
incorrectly converted by
cygwin_conv_to_posix_path() to "c:./" and "c:." respectively. See last
two output
lines of the attached example program.
Pavel Kudrna
/* file: parameters.c
*/
#include <stdio.h>
#include <windows.h>
int main()
{
int i;
char posix_buffer[MAX_PATH];
char *win32_path[]={ "c:\\",
"c:",
"c:\\.\\",
"c:\\.",
"c:.\\",
"c:.",
NULL
};
for(i=0;win32_path[i];i++)
{
cygwin_conv_to_posix_path(win32_path[i], posix_buffer);
printf( "%s\t" "%s\n", win32_path[i], posix_buffer );
}
return 0;
}
$ gcc -o parameters parameters.c
$ ./parameters
c:\ /cygdrive/c
c: /cygdrive/c
c:\.\ /cygdrive/c/
c:\. /cygdrive/c
c:.\ c:./
c:. c:.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |