This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to pass parameters to a windows application


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?

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]