fix subdir-value if homeDir == dirToCreate in mkDirWithCorrectOwnership(), fixes pr #246

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2015-08-03 17:46:29 +02:00
parent 7b5069f1b9
commit 967bd45a63

View File

@@ -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