From 3926deafe132ce52da08ee60b9ed9d339880ed3b Mon Sep 17 00:00:00 2001 From: moodler <moodler> Date: Sun, 25 May 2003 12:46:17 +0000 Subject: [PATCH] Removed three lines - this fixes the path problems occurring when extracting files in Moodle on Windows platforms. This should not affect normal use within Moodle on other platforms. --- lib/pclzip/pclzip.lib.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/pclzip/pclzip.lib.php b/lib/pclzip/pclzip.lib.php index 13b75d6e9e..0806cffde9 100644 --- a/lib/pclzip/pclzip.lib.php +++ b/lib/pclzip/pclzip.lib.php @@ -2477,9 +2477,12 @@ //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privExtract", "list, path=$p_path, remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'"); $v_result=1; - // ----- Check the path - if (($p_path == "") || ((substr($p_path, 0, 1) != "/") && (substr($p_path, 0, 3) != "../"))) - $p_path = "./".$p_path; +// COMMENTED OUT FOR MOODLE - IT WAS CAUSING PROBLEMS FOR WINDOWS - Martin 25/5/2003 +// +// // ----- Check the path +// if (($p_path == "") || ((substr($p_path, 0, 1) != "/") && (substr($p_path, 0, 3) != "../"))) +// $p_path = "./".$p_path; + // ----- Reduce the path last (and duplicated) '/' if (($p_path != "./") && ($p_path != "/")) @@ -4556,4 +4559,4 @@ } // -------------------------------------------------------------------------------- -?> \ No newline at end of file +?> -- 2.39.5