Fix missing leading slash in player's initial working directory
Every possible path/file in GameResponseService uses a leading slash
(e.g. /var/home/{username}), but a player's initial pwd was seeded as
'var/home/{username}' without one. getAllCurrentFilesInDirectory()
matches entries by comparing getPrevPath() (which always has the
leading slash) against pwd, so a fresh player's ls always came back
empty until their first cd command happened to normalize the format.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -202,7 +202,7 @@ final class GameDashboardService
|
|||||||
$setting->setSession($player->getSession());
|
$setting->setSession($player->getSession());
|
||||||
$setting->setPlayer($player);
|
$setting->setPlayer($player);
|
||||||
$setting->setName($pwdSettingName);
|
$setting->setName($pwdSettingName);
|
||||||
$setting->setValue('var/home/' . $player->getUser()->getUsername());
|
$setting->setValue('/var/home/' . $player->getUser()->getUsername());
|
||||||
$this->entityManager->persist($setting);
|
$this->entityManager->persist($setting);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user