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:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; q=dns; s=default; b=dYyzz8fEuFVWHVdn | |
RYW7hSM9dqdlaBAnOXBBqi0gGxjpfHpeFJTbZcJkSkKS+AvyalRXqYlVGtD1y/BQ | |
kbOdwdj9IxF5ikT62iglpKMl0rl2/gj1DRwhdpM2tQBGURMPhA1wkstWJNO3o4wR | |
vsioqTXLfE0jDnwt4HQO0DPnid4= | |
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:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; s=default; bh=tCGlJ1DxjCB8cDEekVJfej | |
eFe0A=; b=j6TV0BL591DTI/oTxZ+TZrJZo8/sAfS1/4Ter1yHQoHzdRczNx36uW | |
0LYdMXD01OwD93ffXUhBQdshdyOfrg7bAtSO+s9aPNy9mTrIe223VHQjJErGgKQ+ | |
gOu7djVn7DvaVM/y/pKMpbKuG8uErUSduVr5HCEnFiiaIkWHrZFiY= | |
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=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 |
X-HELO: | limerock04.mail.cornell.edu |
X-CornellRouted: | This message has been Routed already. |
Subject: | Re: Fonts reorganization and additions |
To: | cygwin AT cygwin DOT com |
References: | <1441962346 DOT 9784 DOT 34 DOT camel AT cygwin DOT com> <55F2B932 DOT 8060101 AT gmail DOT com> <55F30150 DOT 8020906 AT cornell DOT edu> <1441989600 DOT 15240 DOT 4 DOT camel AT cygwin DOT com> <55F327B4 DOT 40208 AT cornell DOT edu> <1442001550 DOT 9548 DOT 6 DOT camel AT cygwin DOT com> <55F5A008 DOT 80308 AT cornell DOT edu> |
From: | Ken Brown <kbrown AT cornell DOT edu> |
Message-ID: | <55F7068D.4080706@cornell.edu> |
Date: | Mon, 14 Sep 2015 13:40:29 -0400 |
User-Agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
MIME-Version: | 1.0 |
In-Reply-To: | <55F5A008.80308@cornell.edu> |
X-IsSubscribed: | yes |
On 9/13/2015 12:10 PM, Ken Brown wrote: > On 9/11/2015 3:59 PM, Yaakov Selkowitz wrote: >> The first thing that should be checked is if the code in setup which >> allows it to unpack files with "illegal" characters in Windows also >> makes sure to create parent directories. Based on these reports my >> *guess* is it doesn't but I haven't looked yet. > > I'm not very familiar with the setup code, but I think I may have found > the problem. The function mkdir_p() in mkdir.cc contains the following, > starting at line 99: > > for (c = path; *c; c++) > { > if (*c == ':') > slash = 0; > if (*c == '/' || *c == '\\') > slash = c; > } > > if (!slash) > return 0; > > If I understand this correctly, the function will return success without > having created the leading directory if the path name contains a colon > and doesn't contain a slash after the last colon. I guess the > assumption is that there is no "leading directory" to be created in this > case. [This part of the code was written in 2000, when a colon could > not be part of a file name.] > > I hope someone who understands the setup code better than I do can take > a look at this. I'm not confident that I understand all the uses of > mkdir_p() or all possible reasons why its in_path argument might contain > a colon. The following patch fixes the problem: diff --git a/mkdir.cc b/mkdir.cc index dabc256..84bb176 100644 --- a/mkdir.cc +++ b/mkdir.cc @@ -98,8 +98,6 @@ mkdir_p (int isadir, const char *in_path, mode_t mode) for (c = path; *c; c++) { - if (*c == ':') - slash = 0; if (*c == '/' || *c == '\\') slash = c; } I don't know if this might cause some other problem, but it seems OK in limited testing. Ken -- 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 |