Skip to content

Commit ef7508e

Browse files
committed
Remove paths from temp and core folders right before returning the response.
1 parent 252733d commit ef7508e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Symfony/src/Codebender/CompilerBundle/Handler/CompilerHandler.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -648,13 +648,9 @@ private function doCompile($compiler_config, &$files, $dir, $CC, $CFLAGS, $CPP,
648648
$output = str_replace("$dir/", "", $output); // XXX
649649
$output = $this->postproc->ansi_to_html(implode("\n", $output));
650650

651-
$output = $this->pathRemover ($output, $compiler_config);
652-
$avr_output = $this->pathRemover ($avr_output, $compiler_config);
653-
654651
$resp = array(
655652
"success" => false,
656653
"step" => 4,
657-
"message" => $output,
658654
"debug" => $avr_output);
659655

660656
/**
@@ -689,14 +685,17 @@ private function doCompile($compiler_config, &$files, $dir, $CC, $CFLAGS, $CPP,
689685
$this->compiler_logger->addInfo($compiler_config["compiler_dir"] . " - Gcc output: " . json_encode($avr_output));
690686
$this->compiler_logger->addInfo($compiler_config["compiler_dir"] . " - Clang initial output: " . json_encode($output));
691687
$this->compiler_logger->addInfo($compiler_config["compiler_dir"] . " - Clang reformated output: " . json_encode($final_clang_output));
688+
$final_clang_output = $this->pathRemover ($final_clang_output, $compiler_config);
692689
$resp["message"] = $final_clang_output;
693690
}else {
694691
$this->compiler_logger->addInfo($compiler_config["compiler_dir"] . " - Gcc output: " . json_encode($avr_output));
695692
$this->compiler_logger->addInfo($compiler_config["compiler_dir"] . " - Clang initial output: " . json_encode($output));
696693
$this->compiler_logger->addInfo($compiler_config["compiler_dir"] . " - Clang reformated output: " . json_encode($next_clang_output));
694+
$next_clang_output = $this->pathRemover ($next_clang_output, $compiler_config);
697695
$resp["message"] = $next_clang_output;
698696
}
699697
}
698+
$resp["message"] = $output;
700699
return $resp;
701700
}
702701
unset($output);

0 commit comments

Comments
 (0)