bug in cygwin_conv_to_posix_path() caused by period in win32 path

Pavel Kudrna Pavel.Kudrna@mff.cuni.cz
Mon Jul 2 17:15:00 GMT 2007

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:\\",
  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/

More information about the Cygwin mailing list