From 951d2d55297e2ca6f03264898f7ddf3ada8302d0 Mon Sep 17 00:00:00 2001 From: Dongsheng Cai Date: Thu, 20 May 2010 07:10:00 +0000 Subject: [PATCH] "MDL-22523, fixed file system plugin bug" --- repository/filesystem/repository.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/repository/filesystem/repository.class.php b/repository/filesystem/repository.class.php index 50e168ab304..695bca319e2 100644 --- a/repository/filesystem/repository.class.php +++ b/repository/filesystem/repository.class.php @@ -114,11 +114,16 @@ class repository_filesystem extends repository { public function global_search() { return false; } - // move file to local moodle + /** + * Return file path + * @return array + */ public function get_file($file, $title = '') { global $CFG; if ($file{0} == '/') { $file = $this->root_path.substr($file, 1, strlen($file)-1); + } else { + $file = $this->root_path.$file; } // this is a hack to prevent move_to_file deleteing files // in local repository