X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_YG,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <20100804112630.GT8324@calimero.vinschen.de>
References: <E2B92C7CBBA64B158FA61FDD9DDC20BC@phoenix>	<AANLkTinVYGVHP9W8w-j1gudobfqZX1aNza0n2XoxqiqC@mail.gmail.com>	<AANLkTinSh1+kMob1K4VX-MDLNzu-VLK+VdyLatjkyCZJ@mail.gmail.com>	<7B35B979DF6941628DE9A6D131AA3909@phoenix>	<AANLkTim1x04h2Rhk-rH8sg3Gc0CN=VASG6xVFwjb3Kyh@mail.gmail.com>	<20100804112630.GT8324@calimero.vinschen.de>
Date: Wed, 4 Aug 2010 20:40:05 +0100
Message-ID: <AANLkTi=pB1yQcsBmWDcuCysSoi=RVAPSS+pf+UDfu-QG@mail.gmail.com>
Subject: Re: How to pass parameters to a windows application
From: Andy Koppe <andy.koppe@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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. =C2=A0I never expected that this wo=
uld
> also be necessary for the wide char case. =C2=A0Anyway, I applied a match=
ing
> patch. =C2=A0As 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?

Andy

--
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

