From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117394 invoked by alias); 14 Sep 2015 17:40:36 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 117382 invoked by uid 89); 14 Sep 2015 17:40:35 -0000 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 Received: from limerock04.mail.cornell.edu (HELO limerock04.mail.cornell.edu) (128.84.13.244) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 14 Sep 2015 17:40:34 +0000 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock04.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id t8EHeWXf009581 for ; Mon, 14 Sep 2015 13:40:32 -0400 Received: from [10.128.135.189] (dhcp-gs-1981.eduroam.cornell.edu [10.128.135.189]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id t8EHeVvK011224 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Mon, 14 Sep 2015 13:40:32 -0400 Subject: Re: Fonts reorganization and additions To: cygwin@cygwin.com References: <1441962346.9784.34.camel@cygwin.com> <55F2B932.8060101@gmail.com> <55F30150.8020906@cornell.edu> <1441989600.15240.4.camel@cygwin.com> <55F327B4.40208@cornell.edu> <1442001550.9548.6.camel@cygwin.com> <55F5A008.80308@cornell.edu> From: Ken Brown Message-ID: <55F7068D.4080706@cornell.edu> Date: Mon, 14 Sep 2015 17:40:00 -0000 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> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00223.txt.bz2 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