root folder

This commit is contained in:
Marc Wäckerlin
2017-03-01 19:37:31 +00:00
parent 3b8fba5d45
commit 004037dc53
3 changed files with 1 additions and 93 deletions

View File

@@ -59,7 +59,7 @@ function tarHeader($Name, $Size, $information=NULL) {
}
function checkPath($pathToCheck) {
global $imagepath, $subpath;
$fullpath = $imagepath.'/'.$pathToCheck;
$fullpath = preg_replace('/\/$/', '', $imagepath.'/'.$pathToCheck);
if ($fullpath==realpath($fullpath) && is_dir($fullpath)) {
$subpath=$pathToCheck;
$imagepath = $fullpath;