From e97a5c2b9d26db2e1dda3422d39711a1801e34a3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 25 May 2021 10:22:34 +0000 Subject: do not shell-quote filenames for environment This allows dtas-player to play files with wonky filenames when piping ffmpeg (or avconv) to sox. SoX-only code dtas-player paths are not affected since they don't require an extra Bourne shell. All of our internal shell pipelines quote "$INFILE", anyways, so there was never any need to escape for those. This may cause compatibility problems for splitfx users, but splitfx is probably too esoteric to have any users besides myself. And I expect anybody editing audio with dtas-splitfx to pick shell-friendly filenames. dtas-player is far more general, and likely to encounter shell-unfriendly filenames which require quoting. --- lib/dtas/splitfx.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/dtas/splitfx.rb') diff --git a/lib/dtas/splitfx.rb b/lib/dtas/splitfx.rb index 58c8ff4..9e1cfd0 100644 --- a/lib/dtas/splitfx.rb +++ b/lib/dtas/splitfx.rb @@ -4,7 +4,6 @@ require_relative '../dtas' require_relative 'format' require_relative 'process' -require_relative 'xs' require 'tempfile' # The backend for dtas-splitfx(1) command, but also supported by dtas-player @@ -13,7 +12,6 @@ require 'tempfile' class DTAS::SplitFX # :nodoc: CMD = 'sox "$INFILE" $COMMENTS $OUTFMT $OUTDST $TRIMFX $FX $RATEFX $DITHERFX' include DTAS::Process - include DTAS::XS attr_reader :infile, :env, :command # for --trim on the command-line @@ -404,10 +402,10 @@ class DTAS::SplitFX # :nodoc: end def infile_env(env, infile) - env["INFILE"] = xs(infile) + env["INFILE"] = infile dir, base = File.split(File.expand_path(infile)) - env["INDIR"] = xs(dir) - env["INBASE"] = xs(base) + env["INDIR"] = dir + env["INBASE"] = base end def expand_cmd(env, command) # for display purposes only -- cgit v1.2.3-24-ge0c7