Files/MDL-14231: reverting previous commit.

This commit is contained in:
scyrma 2008-10-09 07:00:56 +00:00
parent 3da3316d6d
commit db3a0b34d4

View File

@ -1440,11 +1440,10 @@ function put_records_csv($file, $records, $table = NULL) {
/**
* Recursively delete the file or folder with path $location. That is,
* if it is a file delete it. If it is a folder, delete all its content
* then delete it. Does not throw an error if the location does not exists,
* but will return false.
* then delete it. If $location does not exist to start, that is not
* considered an error.
*
* @param $location the path to remove.
* @return bool true if the call to unlink() was successful, false otherwise;
*/
function fulldelete($location) {
if (is_dir($location)) {
@ -1472,8 +1471,6 @@ function fulldelete($location) {
if (!unlink($location)) {
return false;
}
} else {
return false;
}
return true;
}