π | Drupal core | [D7] file_unmanaged_move() should issue rename() where possible instead of copy() & unlink()
πΊπΈUnited States twistor
-
+++ b/includes/file.inc @@ -888,18 +887,66 @@ function file_valid_uri($uri) { + $real_source = drupal_realpath($source) ?: $source; + $real_destination = drupal_realpath($destination) ?: $destination;
We can't use the short ternary.
-
+++ b/includes/file.inc @@ -888,18 +887,66 @@ function file_valid_uri($uri) { - drupal_set_message(t('The specified file %file could not be copied, because no file by that name exists. Please check that you supplied the correct filename.', array('%file' => $original_source)), 'error'); + drupal_set_message(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.', array('%file' => $original_source)), 'error'); ... - watchdog('file', 'File %file (%realpath) could not be copied because it does not exist.', array('%file' => $original_source, '%realpath' => $realpath)); + watchdog('file', 'File %file (%realpath) could not be moved/copied because it does not exist.', array('%file' => $original_source, '%realpath' => $realpath));
Are we ok with these string changes?
πΊπΈUnited States twistor
πΊπΈUnited States twistor