From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 208.118.235.0/24 X-Spam-Status: No, score=-2.1 required=3.0 tests=AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: dtas-all@80x24.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 4E4B6633849 for ; Sat, 3 Oct 2015 09:38:49 +0000 (UTC) Received: from localhost ([::1]:37585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiJHE-00086m-Ms for dtas-all@80x24.org; Sat, 03 Oct 2015 05:38:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiJHD-000867-1q for dtas-all@nongnu.org; Sat, 03 Oct 2015 05:38:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZiJH8-0003Qj-19 for dtas-all@nongnu.org; Sat, 03 Oct 2015 05:38:47 -0400 Received: from dcvr.yhbt.net ([64.71.152.64]:52066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiJH7-0003QU-Rx for dtas-all@nongnu.org; Sat, 03 Oct 2015 05:38:41 -0400 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 7A22E633844; Sat, 3 Oct 2015 09:38:41 +0000 (UTC) From: Eric Wong To: Subject: [PATCH] dtas-cueedit: escape path to temporary file Date: Sat, 3 Oct 2015 09:38:36 +0000 Message-Id: <20151003093836.13825-1-e@80x24.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.71.152.64 Cc: Eric Wong X-BeenThere: dtas-all@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dtas-all-bounces+dtas-all=80x24.org@nongnu.org Sender: dtas-all-bounces+dtas-all=80x24.org@nongnu.org Temporary files may still have spaces or weird chars in them. Just keep in mind we need to use $EDITOR/$VISUAL as-is since that may contain additional command-line arguments, so we cannot pass an array. --- bin/dtas-cueedit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/dtas-cueedit b/bin/dtas-cueedit index 603bf28..5e6970f 100755 --- a/bin/dtas-cueedit +++ b/bin/dtas-cueedit @@ -44,7 +44,7 @@ ARGV.each do |file| backup.write(original) if backup # user edits the file - x!("#{editor} #{tmp.path}") + x!("#{editor} #{xs(tmp.path)}") # avoid an expensive update if the user didn't change anything current = File.binread(tmp.path) -- EW