From f36877b74cd5f4c45a8b64400702f71558d85290 Mon Sep 17 00:00:00 2001 From: Joao Alves Date: Thu, 20 May 2021 14:18:31 +0100 Subject: [PATCH] Fixed path double // in operation --- tinyfilemanager.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index 1f24e16..a565283 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -468,7 +468,11 @@ if (isset($_POST['ajax']) && !FM_READONLY) { // backup files if (isset($_POST['type']) && $_POST['type'] == "backup" && !empty($_POST['file'])) { $fileName = $_POST['file']; - $fullPath = FM_ROOT_PATH . '/'; + if (FM_ROOT_PATH != '/') { + $fullPath = FM_ROOT_PATH . '/'; + } else { + $fullPath = FM_ROOT_PATH; + } if (!empty($_POST['path'])) { $relativeDirPath = fm_clean_path($_POST['path']); $fullPath .= "{$relativeDirPath}/";