From 7d2e522d2b786362bd3adf695ea41266765fecb5 Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Sun, 14 Jan 2018 09:16:24 +0100 Subject: [PATCH] * fixed plugin "You don't have rights to delete" --- system/libs/plugins.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/libs/plugins.php b/system/libs/plugins.php index 0906d277..b3a623a6 100644 --- a/system/libs/plugins.php +++ b/system/libs/plugins.php @@ -194,8 +194,9 @@ class Plugins { break; } - $file = BASE . $file; - if(!is_sub_dir($file, BASE) || realpath(dirname($file)) != dirname($file)) { + $file = str_replace('\\', '/', BASE . $file); + $realpath = str_replace('\\', '/', realpath(dirname($file))); + if(!is_sub_dir($file, BASE) || $realpath != dirname($file)) { $success = false; self::$error = "You don't have rights to delete: " . $file; break;