diff --git a/includes/file.inc b/includes/file.inc index 44e3422..f95faeb 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -719,10 +719,11 @@ function file_usage_delete(stdClass $file, $module, $type = NULL, $id = NULL, $c * stored in the database. This is a powerful function that in many ways * performs like an advanced version of copy(). * - Checks if $source and $destination are valid and readable/writable. - * - Checks that $source is not equal to $destination; if they are an error - * is reported. * - If file already exists in $destination either the call will error out, * replace the file or rename the file based on the $replace parameter. + * - If the $source and $destination are equal, the behavior depends on the + * $replace parameter. FILE_EXIST_REPLACE will error out. FILE_EXIST_RENAME + * will rename the file until the $destination is unique. * - Adds the new file to the files database. If the source file is a * temporary file, the resulting file will also be a temporary file. See * file_save_upload() for details on temporary files. @@ -821,6 +822,9 @@ function file_valid_uri($uri) { * is reported. * - If file already exists in $destination either the call will error out, * replace the file or rename the file based on the $replace parameter. + * - If the $source and $destination are equal, the behavior depends on the + * $replace parameter. FILE_EXIST_REPLACE will error out. FILE_EXIST_RENAME + * will rename the file until the $destination is unique. * - Provides a fallback using realpaths if the move fails using stream * wrappers. This can occur because PHP's copy() function does not properly * support streams if safe_mode or open_basedir are enabled. See