diff --git a/includes/file.inc b/includes/file.inc index e0da216..f148951 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -906,8 +906,10 @@ function file_unmanaged_copy($source, $destination = NULL, $replace = FILE_EXIST file_ensure_htaccess(); // Perform the copy operation. if (!@copy($source, $destination)) { - watchdog('file', 'The specified file %file could not be copied to %destination.', array('%file' => $source, '%destination' => $destination), WATCHDOG_ERROR); - return FALSE; + if ($real_destination && !@copy($source, $real_destination)) { + watchdog('file', 'The specified file %file could not be copied to %destination.', array('%file' => $source, '%destination' => $destination), WATCHDOG_ERROR); + return FALSE; + } } // Set the permissions on the new file.