diff --git a/platform/delete.provision.inc b/platform/delete.provision.inc index 9937b6222b7633460d49c79883e49e21c4aece61..efedd522e82eef2eab8058623c8a1eba8457417c 100644 --- a/platform/delete.provision.inc +++ b/platform/delete.provision.inc @@ -6,8 +6,13 @@ function drush_provision_drupal_pre_provision_delete($backup_file = NULL) { if (d()->type === 'site') { drush_set_option('force', true, 'process'); - drush_invoke("provision-backup", $backup_file); - drush_unset_option('force', 'process'); + if (!empty($backup_file) && !strpos($backup_file, '/')) { + drush_set_error('PROVISION_DELETE_BACKUP_NAME_RELATIVE', dt('The passed backup name is a relative path, storing that in the site directory which is going to be deleted is probably not intended. Try an absolute name, or no name to let one be generated.')); + } + else { + drush_invoke("provision-backup", $backup_file); + drush_unset_option('force', 'process'); + } } }