Commit 5f0aba44 authored by anarcat's avatar anarcat Committed by anarcat
Browse files

#559448 - handle errors from tar extractions properly

parent d667e58b
......@@ -250,9 +250,10 @@ function provision_path_extract($path, &$target, &$reason) {
if (file_exists($path) && is_readable($path)) {
if (is_writeable(dirname($target)) && !file_exists($target) && !is_dir($target)) {
mkdir($target);
provision_shell_exec("tar -zpxf %s -C %s", $path, $target);
drush_log(sprintf("Running: tar -zpxf %s -C %s", $path, $target));
if (is_writeable(dirname($target)) && is_readable(dirname($target)) && is_dir($target)) {
$result = provision_shell_exec("tar -zpxf %s -C %s", $path, $target);
if ($result && is_writeable(dirname($target)) && is_readable(dirname($target)) && is_dir($target)) {
$target = TRUE;
return TRUE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment