protected function findRelativeDir()
{
$current = \getcwd();
if (\strpos($this->session['dir'], $current) === 0) {
$x = Binary::safeStrlen($this->session['dir']);
return Binary::safeSubstr($current, $x + 1);
} else {
throw new \Error('Current path is outside the root directory');
}
}