From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 7D0CD7AF0A for ; Fri, 17 Apr 2015 14:59:34 -0700 (PDT) Received: by wgin8 with SMTP id n8so126062244wgi.0 for ; Fri, 17 Apr 2015 14:58:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=suQ4Ak4WR7k6Mq09rWYtZYrWAnOYlJ+xRwsFX4AJQ6k=; b=VCMXB5H5DpqAQIcRx6LHdzmWNWRrLJyU6d6FY/+PuVEnf/stlFMbV643EbZJRlKs5j 3e40nnD5GSYqmXB+5NWVNRDWqeFfOoKbUq1Ci+/on8C0kpfM5kmWny4hjgRjM+HK0r+T iC/cesTEuFex6vXOcoJFnrohhQ5eU10pCYKM/Z0BV1F7I8glnvyHreAtA4tV9avnKW8D lb8G9LDbtLKXW8Sx3OkXaVKNG9+fiBnkIHvfZBdQLPXW3hHuqIkeZLrwbjLJhx1zKscd gfKzWTYEnEufRO6MJAGaBZtTxUZFiDaENs2QdoDzSE3ufItkNr8JC3F/u+XwuMk6Zxir H89Q== X-Received: by 10.194.62.52 with SMTP id v20mr9671566wjr.137.1429307909799; Fri, 17 Apr 2015 14:58:29 -0700 (PDT) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id e10sm4324803wij.11.2015.04.17.14.58.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Apr 2015 14:58:28 -0700 (PDT) Date: Fri, 17 Apr 2015 22:58:26 +0100 From: Adam Thompson To: Karl Dahlke Message-ID: <20150417215826.GF5949@toaster.adamthompson.me.uk> References: <20150316174053.eklhad@comcast.net> <20150417125002.GA14517@toaster.adamthompson.me.uk> <20150317140113.eklhad@comcast.net> <20150417213405.GE5949@toaster.adamthompson.me.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="H4SyuGOnfnj3aJqJ" Content-Disposition: inline In-Reply-To: <20150417213405.GE5949@toaster.adamthompson.me.uk> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] wordexp again X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2015 21:59:34 -0000 --H4SyuGOnfnj3aJqJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Apr 17, 2015 at 10:34:05PM +0100, Adam Thompson wrote: > > By the way, removing quick check had nothing to do with the bug > > that I posted at the top of this thread. > > You stil can't edit a directory with backslash in the name, > > and I think that is a bug in wordexp that we can't get around. > > That's maybe another reason to go back to my home grown code. No, it's a bug in our code. I've checked and we've got a couple of interesting things happening. With wordexp enabled, we're duble expanding the filename, once before we pass it to sortedDirList, and once in nextScanFile. Without wordexp expansion, we don't expand the file name before we get to nextScanFile, but then the single \ is swallowed by wordexp so the glob is incorrect. I should've spotted this when we first switched to using wordexp because the call in nextScanFile really should be to glob rather than wordexp. Better still, I think we just shouldn't have switched nextScanFile to wordexp since we just want a directory listing in this case. I've also tried out the inverted ` character and that seems to make much more sense in terms of usable behaviour. Cheers, Adam. --H4SyuGOnfnj3aJqJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVMYICAAoJELZ22lNQBzHOjQoH/iC0qY4hs8fli33057kag52k K3OVJzXlnjtRwvJ4xDnpr2IIYm+GG1BtZoKIbRNi8N7yLWD0deAVyvPwnxJg3Rtl k1wk75/u8l06La9SwWmDLRZe5hK3hvgSu/qNQwAvbk05bEJc8YJ65rw1clFH2Vz7 3L+0f/P0jd71Ydewi1gv1cc8ctrSeywUbW4ed4il1v8eXCDY09UHA/ZCJwVtcko1 MqgPdXuV8Ej9iAsm6be0vFrjQdivXRsPwTnzWujOnc1a89lB0rp0XPvL9b4PilNy vv0stSyYqVDXkxBHMAwOOkZP+ywFLU9zD9Fli7JzY4Sat3NiYIrmm36tEt5k6Y8= =5R7J -----END PGP SIGNATURE----- --H4SyuGOnfnj3aJqJ--