diff --git a/core/includes/file.inc b/core/includes/file.inc index e7c73c928b..3273e7e2ff 100644 --- a/core/includes/file.inc +++ b/core/includes/file.inc @@ -512,7 +512,8 @@ function file_unmanaged_prepare($source, &$destination = NULL, $replace = FILE_E // Assert that the source file actually exists. if (!file_exists($source)) { - // @todo Replace \Drupal::messenger()->addError() calls with exceptions instead. + // @todo Replace \Drupal::messenger()->addError() calls with exceptions + // instead. \Drupal::messenger()->addError(t('The specified file %file could not be moved/copied because no file by that name exists. Please check that you supplied the correct filename.', ['%file' => $original_source])); if (($realpath = $file_system->realpath($original_source)) !== FALSE) { $logger->notice('File %file (%realpath) could not be moved/copied because it does not exist.', ['%file' => $original_source, '%realpath' => $realpath]);