From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MzGYMJCF919NFwAAWB0awg (envelope-from ) for ; Thu, 07 Jan 2021 17:05:04 -0500 Received: by simark.ca (Postfix, from userid 112) id B65B41E965; Thu, 7 Jan 2021 17:05:04 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 3C2391E519 for ; Thu, 7 Jan 2021 17:05:04 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8365B386F427; Thu, 7 Jan 2021 22:05:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8365B386F427 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1610057103; bh=/5PGxlj1bEpR8oqgSb0qQdhPyk6SDqhCo/LjJfYWrnk=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=uuRcWW3jzMUlc18swTpM45t1OZp5b7VsOPRpVGsyiudJ46Kw5p20eZsQcpRfeO8Hk UmslLXZ07SVksowlKccmln3VnlMYZ4c8378pMuYorLst7RkaLKVGUfEpxyewshuWml YNo+v8Zg+7dd+uCbobUj4yL11Tuo/R6/24V1gf30= Received: from beryx.lancelotsix.com (beryx.lancelotsix.com [164.132.98.193]) by sourceware.org (Postfix) with ESMTPS id 01F81386F03C for ; Thu, 7 Jan 2021 22:05:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 01F81386F03C Received: from [IPv6:2a02:390:8443:0:ac3f:305a:5a38:83cc] (unknown [IPv6:2a02:390:8443:0:ac3f:305a:5a38:83cc]) by beryx.lancelotsix.com (Postfix) with ESMTPSA id C700B2E070; Thu, 7 Jan 2021 23:04:59 +0100 (CET) Subject: Re: [PATCH] gdb: check for empty strings in get_standard_cache_dir/get_standard_config_dir To: Simon Marchi , Tom Tromey , Simon Marchi via Gdb-patches References: <20210107205725.2010353-1-simon.marchi@efficios.com> <87pn2gv4wh.fsf@tromey.com> <69b9d1e9-ec9c-5bdc-4255-4f59440c0b5f@efficios.com> <21cd6bb7-f220-37c6-eef8-ede223a761ae@lancelotsix.com> <16b61c65-e8d0-d744-85f0-ca3d79439ca4@efficios.com> Message-ID: <3f4949bb-3dea-aa52-3a39-a3f9aebe1538@lancelotsix.com> Date: Thu, 7 Jan 2021 22:04:58 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <16b61c65-e8d0-d744-85f0-ca3d79439ca4@efficios.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (beryx.lancelotsix.com [0.0.0.0]); Thu, 07 Jan 2021 23:05:00 +0100 (CET) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Cc: sourcewarebugz@kyber.fi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" > What's annoying though is that glob won't work with non-existent directories. > So if I use > > /home/smarchi/my/non/existent/directory > > it is accepted, and these directories will be created. But I set > > ~/my/non/existent/directory > > gdb_tilde_expand will fail. Perhaps it's just a limitation of gdb_tilde_expand, > and it should be changed to use something else than glob(3) in order to support > non-existent paths. > > Simon Using glob just to expand the first path component should do the trick quite easily. I’ll have a look into it to update gdb_tilde_expand (unless someone does it before me). Lancelot