Commit ceaa53c5 authored by helmo's avatar helmo

Issue #2377819: Gzipping backups suppresses file permissions errors

parent 1bf412ef
......@@ -78,14 +78,12 @@ function drush_provision_drupal_provision_backup() {
}
$olddir = getcwd();
// we need to do this because some retarded implementations of tar (e.g. SunOS) don't support -C
if (!chdir(d()->site_path)) {
return drush_set_error('PROVISION_BACKUP_PATH_NOT_FOUND', dt('cannot change directory to %dir', array('%dir' => d()->site_path)));
}
if (substr($backup_file, -2) == 'gz') {
// same as above: some do not support -z
$command = 'tar cpf - . | gzip -c > %s';
$command = 'tar cpfz %s .';
} else {
$command = 'tar cpf %s .';
}
......
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