Commit f443840d authored by omega8cc's avatar omega8cc

Use is_readable() and file_exists() checks instead of file_exists() for backup file.

parent c4299067
......@@ -20,7 +20,7 @@ function drush_provision_drupal_provision_backup_validate($backup_file = NULL) {
drush_set_error('PROVISION_DRUPAL_SITE_NOT_FOUND');
}
// This is the actual drupal provisioning requirements.
// This is the actual drupal provisioning requirements.
if (!is_dir(d()->platform->server->backup_path)) {
drush_set_error('PROVISION_BACKUP_PATH_NOT_FOUND');
}
......@@ -126,7 +126,7 @@ function drush_provision_drupal_post_provision_backup() {
*/
function drush_provision_drupal_provision_backup_rollback() {
$backup_file = drush_get_option('backup_file');
if (file_exists($backup_file)) {
if (is_readable($backup_file) && is_file($backup_file)) {
provision_file()->unlink($backup_file)
->succeed('Removed stale backup file @path')
->fail('Failed deleting backup file @path');
......
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