@ -159,9 +159,10 @@ class Daemon {
if ($cwd === false) {
return false;
}
$path = substr($cwd, 1)."/".$path;
$path = explode("/", substr($cwd, 1)."/".$path);
} else {
$path = explode("/", substr($path, 1));
$out = [];
foreach ($path as $p) {
if ($p === "..") {
@ -47,6 +47,12 @@ class TestDaemon extends \JKingWeb\Arsse\Test\AbstractTest {
["/run", "/home/me", "/run"],
["/./run", "/home/me", "/run"],
["/../run", "/home/me", "/run"],
["/run/../run", "/home/me", "/run"],
["/run/./run", "/home/me", "/run/run"],
["run", "/home/me", "/home/me/run"],
["run/..", "/home/me", "/home/me"],
[".", "/", "/"],
[".", false, false],
];