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 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 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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 #include 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/