From 967bd45a6348d53e7b98041c104dbffcbf116908 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Mon, 3 Aug 2015 17:46:29 +0200 Subject: [PATCH] fix subdir-value if homeDir == dirToCreate in mkDirWithCorrectOwnership(), fixes pr #246 Signed-off-by: Michael Kaufmann (d00p) --- lib/functions/filedir/function.mkDirWithCorrectOwnership.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions/filedir/function.mkDirWithCorrectOwnership.php b/lib/functions/filedir/function.mkDirWithCorrectOwnership.php index 4acc30fd..97e739ba 100644 --- a/lib/functions/filedir/function.mkDirWithCorrectOwnership.php +++ b/lib/functions/filedir/function.mkDirWithCorrectOwnership.php @@ -47,7 +47,7 @@ function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid, $placeind if(substr($dirToCreate, 0, strlen($homeDir)) == $homeDir) { - $subdir = substr($dirToCreate, strlen($homeDir)); + $subdir = substr($dirToCreate, strlen($homeDir) - 1); $within_homedir = true; } else