X-Spam-Check-By: sourceware.org Message-ID: <46967A99.5040208@mff.cuni.cz> Date: Thu, 12 Jul 2007 21:01:45 +0200 From: Pavel Kudrna User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: bug in cygwin_conv_to_posix_path() caused by period in win32 path References: <468A1024 DOT 8000007 AT mff DOT cuni DOT cz> <468A441A DOT 2000009 AT cygwin DOT com> <468B657B DOT 3050306 AT mff DOT cuni DOT cz> <20070704213927 DOT GC16838 AT trixie DOT casa DOT cgf DOT cx> <468D70E6 DOT 4070403 AT mff DOT cuni DOT cz> <468D75C5 DOT 5050507 AT cygwin DOT com> <20070706001522 DOT GB22578 AT ednor DOT casa DOT cgf DOT cx> In-Reply-To: <20070706001522.GB22578@ednor.casa.cgf.cx> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 Christopher Faylor wrote: > The issue is well understood and there is no > reason to send more email about this unless the email contains a patch. > > cgf > The current isabspath() macro requires an absolute path starting with drive letter and colon to be just drive letter and colon or to be followed by (back)slash. See \usr\src\cygwin-1.5.24-2\winsup\cygwin\winsup.h: #define isabspath(p) \ (isdirsep (*(p)) || (isalpha (*(p)) && (p)[1] == ':' && (!(p)[2] || isdirsep ((p)[2])))) So that c:\, c:, c:\. are abspaths but c:. is not! I suggest to drop that requirement so that absolute path would start with slash, backslash or drive letter and colon. #define isabspath(p) \ ( isdirsep (*(p)) || (isalpha (*(p)) && (p)[1] == ':' ) ) After that change cygwin_conv_to_posix_path() treats all following paths in the same way: c:\ /cygdrive/c c: /cygdrive/c c:\.\ /cygdrive/c/ c:\. /cygdrive/c c:.\ /cygdrive/c/./ c:. /cygdrive/c/. Before the suggested change last two items were slashified only. Pavel Kudrna -- 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/