diff --git a/core/lib/Drupal/Core/Updater/Updater.php b/core/lib/Drupal/Core/Updater/Updater.php index b125192..e8934ed 100644 --- a/core/lib/Drupal/Core/Updater/Updater.php +++ b/core/lib/Drupal/Core/Updater/Updater.php @@ -320,9 +320,7 @@ public function prepareInstallDirectory(&$filetransfer, $directory) { $filetransfer->chmod($parent_dir, intval($old_perms, 8)); } catch (FileTransferException $e) { - $message = t($e->getMessage(), $e->arguments); - $throw_message = t('Unable to create %directory due to the following: %reason', array('%directory' => $directory, '%reason' => $message)); - throw new UpdaterException($throw_message); + throw new UpdaterFileTransferFolderException($e->getMessage(), $e->getCode(), $e->arguments, $directory); } } // Put the parent directory back. diff --git a/core/lib/Drupal/Core/Updater/UpdaterFileTransferException.php b/core/lib/Drupal/Core/Updater/UpdaterFileTransferException.php deleted file mode 100644 index e34e0f6..0000000 --- a/core/lib/Drupal/Core/Updater/UpdaterFileTransferException.php +++ /dev/null @@ -1,20 +0,0 @@ -arguments = $arguments; + } + +} diff --git a/core/modules/update/update.authorize.inc b/core/modules/update/update.authorize.inc index eb52faa..4adaf90 100644 --- a/core/modules/update/update.authorize.inc +++ b/core/modules/update/update.authorize.inc @@ -12,6 +12,7 @@ use Drupal\Core\FileTransfer\FileTransferException; use Drupal\Core\Updater\UpdaterException; +use Drupal\Core\Updater\UpdaterFileTransferFolderException; use Drupal\Core\Url; /** @@ -181,6 +182,10 @@ function update_authorize_batch_copy_project($project, $updater_name, $local_url catch (FileTransferException $e) { $message = t('File Transfer failed, reason: @reason', array('@reason' => strtr($e->getMessage(), $e->arguments))); } + catch (UpdaterFileTransferFolderException $e) { + $message = t($e->getMessage(), $e->arguments); + $message = t('Unable to create %directory due to the following: %reason', array('%directory' => $e->directory, '%reason' => $message)); + } catch (UpdaterException $e) { $message = $e->getMessage(); }