delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/04/13/19:39:16

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL
X-Spam-Check-By: sourceware.org
Message-ID: <4F88B904.2000304@cwilson.fastmail.fm>
Date: Fri, 13 Apr 2012 19:38:44 -0400
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: [ANNOUNCEMENT] Updated: cygutils-1.4.10-1
References: <announce DOT 20120413040306 DOT DEBDF8E01B5 AT frontend1 DOT nyi DOT mail DOT srv DOT osa> <20120413061707 DOT GA4000 AT qp9482>
In-Reply-To: <20120413061707.GA4000@qp9482>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 4/13/2012 2:17 AM, Denis Excoffier wrote:
>>> * Added -R/--raw option to readshortcut (prevents expanding embedded
>>>    environment variables within paths). Reported by Denis Excoffier.
>
> Tried the new --raw option, with no effect.
>
> In fact --raw is the default in this version.

Thanks for the report -- it's a one-line fix (*). I'll try roll out a 
new release soon; need to figure out what's up with lpr.exe first.

(*) Well, sort of.  First, realize that --raw only affects the target; 
the IShellLink functions related to stuff like current working directory 
or arguments or icon path don't support the SLGP_RAWPATH setting (in 
fact, they don't do variable interpolation at all). So, for those 
elements you'll always see them "raw".

However, cygwin's path conversion logic thinks that:
   '%HOMEDRIVE%%HOMEPATH%'
is a relative path of some sort, and prints it out this way (unless -w):

$ readshortcut.exe -g Accessories/Command\ Prompt.lnk
/c/Users/All Users/Start Menu/Programs/%HOMEDRIVE%%HOMEPATH%

I might need to add some logic so that if a value starts with a 
DOS-style envvar, that all win<->posix processing is simply 
skipped...that's more than one line.

And if I was really clever and ambitious, I'd modify how !--raw works, 
and manually perform %foo%-variable interpolation for all the other fields.

--
Chuck


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019