| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:message-id:from:to:mime-version | |
| :content-transfer-encoding:content-type:subject:date:in-reply-to | |
| :references; q=dns; s=default; b=R8Ms2xcTYwcJeyIaQOAXk+Jsy3OJa1y | |
| NYwjuuMIPC4NmBODKceLjC8iacLwPQwMZKRa+fQ7QlduHsZ+2hx7ZnVFxHuF4RJH | |
| VywVwCyNnuh2dksIN3jcx+V+nsmnW+2ghw1DeuNvYElD/QUAUcqVxwRc6x4EzlJt | |
| 8jmRuuOkX3gg= | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:message-id:from:to:mime-version | |
| :content-transfer-encoding:content-type:subject:date:in-reply-to | |
| :references; s=default; bh=Ff1YCIiXZWzHb1P20oWzU9sDa58=; b=u1LNb | |
| WqT0AZ3KTWFkduf5e04i50tf8OOPtp9LlVt6PXgN1h6z6jTt6irJYGrBfyKO60wP | |
| Xj60hyJmDwdkojcXcV8cZepeQNxts7BnJz0C+AWuaabmVh0ueOiJJWXM/6syDNGI | |
| ltaQWisOySCYVV9augdwIy6KYSfFA2MjU8nXeM= | |
| 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 |
| Authentication-Results: | sourceware.org; auth=none |
| X-Virus-Found: | No |
| X-Spam-SWARE-Status: | No, score=-0.7 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 |
| X-HELO: | out2-smtp.messagingengine.com |
| Message-Id: | <1445904708.1171081.420968713.3D94007E@webmail.messagingengine.com> |
| From: | Anthony Heading <anthony AT ajrh DOT net> |
| To: | Mark Geisert <mark AT maxrnd DOT com>, cygwin AT cygwin DOT com |
| MIME-Version: | 1.0 |
| Subject: | Re: mkshortcut (cygutils-1.4.14) free error |
| Date: | Mon, 26 Oct 2015 20:11:48 -0400 |
| In-Reply-To: | <loom.20151026T205200-829@post.gmane.org> |
| References: | <1445135414 DOT 3384650 DOT 413058409 DOT 46BC94AD AT webmail DOT messagingengine DOT com> <1445823930 DOT 241438 DOT 419951441 DOT 109BA262 AT webmail DOT messagingengine DOT com> <562E30AF DOT 5020502 AT cornell DOT edu> <loom DOT 20151026T205200-829 AT post DOT gmane DOT org> |
| X-IsSubscribed: | yes |
On Mon, Oct 26, 2015, at 03:54 PM, Mark Geisert wrote:
> There are configure errors from this process, at least on my
> machine. I'll take on maintenance of this package. Give me a short
> while to get my sea legs. Thanks Ken for the pointers and Corinna
> for the nudge.
Thanks Mark. I would try to suggest you beat me to the punch but the
truth is you're much more noble.
I didn't hit any explicit configure issue myself, rather a bunch of
unrecognized case-invariant strcmp variants, which took about 10 seconds
to fix but did make me wonder about the source code. And then this
below was the slightly trickier issue:
% src/mkshortcut/.libs/mkshortcut xyzzy
mkshortcut: Saving "xyzzy.lnk" failed; does the target directory exist?
The packaged binary does not do this.
Fiddling about with various command-line flags suggests the issue is
with saving the link to a non-absolute path; Google sort of vaguely
implies that IPersistFile may have changed semantics starting in Windows
8, but the docs I have say the Save() path should be absolute. So I
added the minimal patch below. At least, I think it's minimal, but I'd
certainly defer to you as the new maintainer! Anyhow, attached below
fwiw in case it's of any help.
Rgds
Anthony
--- mkshortcut.c.orig 2015-10-17 21:57:08.000000000 -0400
+++ mkshortcut.c 2015-10-17 23:52:50.723030500 -0400
@@ -421,6 +421,7 @@
IShellLink *shell_link;
IPersistFile *persist_file;
WCHAR widepath[MAX_PATH];
+ char link_path[MAX_PATH];
/* If there's a colon in the TARGET, it should be a URL */
if (strchr (opts.target_arg, ':') != NULL)
@@ -596,6 +598,14 @@
free (buf_str);
}
+ hres = GetFullPathName(link_name, sizeof(link_path), link_path, 0);
+ if (hres == 0) {
+ fprintf (stderr, "%s: Could not qualify link name\n",
program_name);
+ return 2;
+ }
+ free (link_name);
+ link_name = xstrndup(link_path, strlen(link_path));
+
/* Setup description text */
if (opts.desc_arg != NULL)
{
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |