This is the mail archive of the
cygwin
mailing list for the Cygwin project.
bug in cygwin_conv_to_posix_path() caused by period in win32 path
- From: Pavel Kudrna <Pavel dot Kudrna at mff dot cuni dot cz>
- To: cygwin at cygwin dot com
- Date: Mon, 02 Jul 2007 19:17:03 +0200
- Subject: bug in cygwin_conv_to_posix_path() caused by period in win32 path
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/