From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14143 invoked by alias); 5 Aug 2010 08:21:15 -0000 Received: (qmail 14130 invoked by uid 22791); 5 Aug 2010 08:21:13 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Thu, 05 Aug 2010 08:21:09 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id BFB856D42F4; Thu, 5 Aug 2010 10:21:06 +0200 (CEST) Date: Thu, 05 Aug 2010 08:21:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: How to pass parameters to a windows application Message-ID: <20100805082106.GB4610@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <7B35B979DF6941628DE9A6D131AA3909@phoenix> <20100804112630.GT8324@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2010-08/txt/msg00087.txt.bz2 On Aug 4 20:40, Andy Koppe wrote: > On 4 August 2010 12:26, Corinna Vinschen wrote: > > It's a shame that not even the official Win32 APIs are always clean > > in terms of the long path name definition. > > Yep, and MSDN doesn't even seem to mention it. > > >> Therefore I'm wondering whether it wouldn't be better to address this > >> once and for all in cygwin_conv_path itself by doing what cygpath > >> does: assuming the resulting path fits into MAX_PATH, drop "\\?\" from > >> all long paths and turn "UNC\" into "\\". > > > > This is already implemented in cygwin_conv_path for some time, but > > only for the CCP_POSIX_TO_WIN_A case.  I never expected that this would > > also be necessary for the wide char case.  Anyway, I applied a matching > > patch.  As long as the resulting wide char path is not longer than > > MAX_PATH, it will be stripped of the long path prefix. > > Great. Seems to be working fine for me. > > This allows dropping the equivalent hack from cygpath, doesn't it? Right, but it doesn't hurt either. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple