Mail Archives: cygwin/2007/07/02/13:16:18
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/
- Raw text -