Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 5ce9e670 authored by Naethis's avatar Naethis
Browse files

Enclose arguments in quotation marks

Mostly to deal with spaces in file paths
parent 3ea5926a
No related branches found
No related tags found
No related merge requests found
...@@ -94,7 +94,7 @@ extraHEVCArgList = paramToArgList(extraHEVCParams); ...@@ -94,7 +94,7 @@ extraHEVCArgList = paramToArgList(extraHEVCParams);
if ispc if ispc
redirect = @(logfile) ['> "',logfile,'" | type "' logfile, '"']; redirect = @(logfile) ['> "',logfile,'" | type "' logfile, '"'];
elseif isunix elseif isunix
redirect = @(logfile) ['| tee ' ,logfile]; redirect = @(logfile) ['| tee "' ,logfile, '"'];
end end
% Execute command % Execute command
......
...@@ -41,7 +41,7 @@ if status, error('HEVC Error'); end ...@@ -41,7 +41,7 @@ if status, error('HEVC Error'); end
end end
function argList = paramToArg(parameters,values) function argList = paramToArg(parameters,values)
argList = cellfun(@(param,val) ['--',param,'=',val],... argList = cellfun(@(param,val) ['--',param,'="',val,'"'],...
parameters,values,'UniformOutput',false); parameters,values,'UniformOutput',false);
argList = strjoin(argList(:)); argList = strjoin(argList(:));
end end
\ No newline at end of file
...@@ -72,7 +72,7 @@ function argList = paramToArg(parameters,values) ...@@ -72,7 +72,7 @@ function argList = paramToArg(parameters,values)
indLog = strcmp(parameters,'LogFile'); ind = indLog; indLog = strcmp(parameters,'LogFile'); ind = indLog;
argLog = strjoin(['>' ,values(indLog) ]); argLog = strjoin(['>' ,values(indLog) ]);
argList = cellfun(@(param,val) ['--',param,'=',val],... argList = cellfun(@(param,val) ['--',param,'="',val,'"'],...
parameters(~ind),values(~ind),'UniformOutput',false); parameters(~ind),values(~ind),'UniformOutput',false);
argList = [argList;argLog]; argList = [argList;argLog];
......
...@@ -72,7 +72,7 @@ function argList = paramToArg(parameters,values) ...@@ -72,7 +72,7 @@ function argList = paramToArg(parameters,values)
indLog = strcmp(parameters,'LogFile'); ind = indLog; indLog = strcmp(parameters,'LogFile'); ind = indLog;
argLog = strjoin(['>' ,values(indLog) ]); argLog = strjoin(['>' ,values(indLog) ]);
argList = cellfun(@(param,val) ['--',param,'=',val],... argList = cellfun(@(param,val) ['--',param,'="',val,'"'],...
parameters(~ind),values(~ind),'UniformOutput',false); parameters(~ind),values(~ind),'UniformOutput',false);
argList = [argList;argLog]; argList = [argList;argLog];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment