mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Files/MDL-14231: reverting previous commit.
This commit is contained in:
parent
3da3316d6d
commit
db3a0b34d4
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user