From 4f446b2e363699181d1a848463abbf078fefe98c Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 13 May 2003 19:53:17 +0000 Subject: [PATCH] Minor changes in course_files_check_backup to avoid the backup of files under get_string("backupdir") --- backup/lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backup/lib.php b/backup/lib.php index 52e022f5bf..2f495b7afc 100644 --- a/backup/lib.php +++ b/backup/lib.php @@ -174,9 +174,10 @@ //Check if directory exists if (is_dir($rootdir)) { $coursedirs = get_directory_list($rootdir,$CFG->moddata); + $backupdir = get_string("backupdir"); foreach ($coursedirs as $dir) { //Check it isn't backupdir - if (dirname($dir) !== get_string("backupdir")) { + if (strpos($dir,$backupdir)!==0) { //Insert them into backup_files $status = execute_sql("INSERT INTO {$CFG->prefix}backup_files (backup_code, file_type, path) -- 2.39.5