MDL-78442 tool_moodlenet: Fix directory path passed to antivirus scanner

This commit is contained in:
Andi Permana
2025-12-02 15:46:37 +07:00
parent e5f1a32269
commit 7a5fc382fa
2 changed files with 2 additions and 2 deletions
@@ -86,7 +86,7 @@ class import_backup_helper {
}
[$filepath, $filename] = $this->remoteresource->download_to_requestdir();
\core\antivirus\manager::scan_file($filepath, $filename, true);
\core\antivirus\manager::scan_file($filepath . DIRECTORY_SEPARATOR . $filename, $filename, true);
// Check the final size of file against the user upload limits.
$localsize = filesize(sprintf('%s/%s', $filepath, $filename));
@@ -78,7 +78,7 @@ class import_strategy_file implements import_strategy {
// Download the file into a request directory and scan it.
[$filepath, $filename] = $resource->download_to_requestdir();
avmanager::scan_file($filepath, $filename, true);
avmanager::scan_file($filepath . DIRECTORY_SEPARATOR . $filename, $filename, true);
// Check the final size of file against the user upload limits.
$localsize = filesize(sprintf('%s/%s', $filepath, $filename));