Merge branch 'ent-7325-fallo-en-el-borrado-de-los-data-de-tmp-para-tareas-vmware' into 'develop'
Allow sending file_path with symbols See merge request artica/pandorafms!4043
This commit is contained in:
commit
6e087397fe
|
@ -805,7 +805,9 @@ sub transfer_xml {
|
|||
if (empty($file_name)){
|
||||
$file_name = trim(`hostname`);
|
||||
}
|
||||
|
||||
|
||||
# Tentacle server does not allow files with symbols in theirs name.
|
||||
$file_name =~ s/[^a-zA-Z0-9_-]//g;
|
||||
$file_name .= "." . sprintf("%d",time()) . ".data";
|
||||
}
|
||||
|
||||
|
@ -867,11 +869,11 @@ sub transfer_xml {
|
|||
my $r = -1;
|
||||
#Send using tentacle
|
||||
if ($^O =~ /win/i) {
|
||||
$msg = `$conf->{tentacle_client} -v -a $conf->{tentacle_ip} -p $conf->{tentacle_port} $conf->{tentacle_opts} "$file_path"`;
|
||||
$msg = `$conf->{tentacle_client} -v -a $conf->{tentacle_ip} -p $conf->{tentacle_port} $conf->{tentacle_opts} '$file_path'`;
|
||||
$r = $?;
|
||||
}
|
||||
else {
|
||||
$msg = `$conf->{tentacle_client} -v -a $conf->{tentacle_ip} -p $conf->{tentacle_port} $conf->{tentacle_opts} "$file_path" 2>&1`;
|
||||
$msg = `$conf->{tentacle_client} -v -a $conf->{tentacle_ip} -p $conf->{tentacle_port} $conf->{tentacle_opts} '$file_path' 2>&1`;
|
||||
$r = $?;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue