From 491e3f35eff42f27dab61d74c068515c9827cd40 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 20 Mar 2011 00:48:57 +0100 Subject: [PATCH] Applied patch for folders with special characters --- root/includes/acp/acp_portal.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/root/includes/acp/acp_portal.php b/root/includes/acp/acp_portal.php index 79120f5c..e893a5f5 100644 --- a/root/includes/acp/acp_portal.php +++ b/root/includes/acp/acp_portal.php @@ -917,9 +917,11 @@ class acp_portal $compress->extract($mod_dir . '_tmp/'); $compress->close(); $folder_contents = scandir($mod_dir . '_tmp/', 1); // This ensures dir is at index 0 + $cut_array = array('.', '..'); + $folder_contents = array_diff($folder_contents, $cut_array); // We need to check if there's a main directory inside the temp MOD directory - if (sizeof($folder_contents) == 3) + if (sizeof($folder_contents) == 1) { // We need to move that directory then $this->directory_move($mod_dir . '_tmp/' . $folder_contents[0], $upload_path . '/' . $folder_contents[0]); @@ -939,7 +941,6 @@ class acp_portal // Now we need to get the files inside the folders $folder_contents = scandir($mod_dir); - $cut_array = array('.', '..'); $folder_contents = array_diff($folder_contents, $cut_array);