mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00
MDL-41337 files: Fixed bug with accidental delete of the root directory
This commit is contained in:
parent
68291f2d57
commit
d90c811585
3 changed files with 37 additions and 2 deletions
|
@ -832,7 +832,7 @@ function file_save_draft_area_files($draftitemid, $contextid, $component, $filea
|
|||
$newhashes = array();
|
||||
$filecount = 0;
|
||||
foreach ($draftfiles as $file) {
|
||||
if (!$options['subdirs'] && ($file->get_filepath() !== '/' or $file->is_directory())) {
|
||||
if (!$options['subdirs'] && $file->get_filepath() !== '/') {
|
||||
continue;
|
||||
}
|
||||
if (!$allowreferences && $file->is_external_file()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue