Commit ace6d538 authored by anarcat's avatar anarcat Committed by anarcat

when doing backups, do not use a seperate command to cd, tell tar to use that...

when doing backups, do not use a seperate command to cd, tell tar to use that directory instead. this will make sure that the command doesn't succeed if the source directory doesn't exist
parent 64ffdf72
......@@ -50,7 +50,7 @@ function drush_provision_drupal_provision_backup($url) {
$backup_file = drush_get_option('backup_file');
// Adds the site directory into the backup file
drush_log(dt("Adding sites directory to !backup_file", array('!backup_file' => $backup_file)), 'backup');
$result = provision_shell_exec("cd %s; tar -rf %s * ", drush_get_option('sites_path') . "/$url", $backup_file);
$result = provision_shell_exec("tar -C %s -r -f %s * ", drush_get_option('sites_path') . "/$url", $backup_file);
if (!$result && !drush_get_option('force', false)) {
drush_set_error('PROVISION_BACKUP_FAILED', dt("Could not back up sites directory for drupal"));
......
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