MDL-18384 better symlink support, do not recurse symlinks when deleting - patch by Matt Oquist, thanks; backported from MOODLE_19_STABLE

This commit is contained in:
skodak
2009-04-05 20:56:51 +00:00
parent cd78b6a4fd
commit 4ef4057d19
+1 -1
View File
@@ -493,7 +493,7 @@ if (!function_exists('file_get_contents')) {
* @param $location the path to remove.
*/
function fulldelete($location) {
if (is_dir($location)) {
if (is_dir($location) and !is_link($location)) {
$currdir = opendir($location);
while (false !== ($file = readdir($currdir))) {
if ($file <> ".." && $file <> ".") {