From c4ffed8a441fb0f16f0d206218b3580ae4460797 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 13 Apr 2015 00:55:14 +0000 Subject: escape INFILE and related environment variables We may expand them, so ensure they're properly escaped, first for use in shell snippets. --- lib/dtas/splitfx.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/dtas/splitfx.rb') diff --git a/lib/dtas/splitfx.rb b/lib/dtas/splitfx.rb index 022fbfe..fcd0028 100644 --- a/lib/dtas/splitfx.rb +++ b/lib/dtas/splitfx.rb @@ -362,8 +362,10 @@ class DTAS::SplitFX # :nodoc: end def infile_env(env, infile) - env["INFILE"] = infile - env["INDIR"], env["INBASE"] = File.split(File.expand_path(infile)) + env["INFILE"] = xs(infile) + dir, base = File.split(File.expand_path(infile)) + env["INDIR"] = xs(dir) + env["INBASE"] = xs(base) end def _expand_cmd(env, command) -- cgit v1.2.3-24-ge0c7