1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 22:54:57 +00:00

Make chdir("/") work.

It surprisingly wasn't possible to resolve the path "/".
This commit is contained in:
Andreas Kling 2018-11-10 15:40:24 +01:00
parent b8264e7d47
commit 39d6b96d21

View file

@ -496,6 +496,8 @@ InodeIdentifier VirtualFileSystem::resolvePath(const String& path, int& error, I
for (unsigned i = 0; i < parts.size(); ++i) {
bool wasRootInodeAtHeadOfLoop = inode.isRootInode();
auto& part = parts[i];
if (part.isEmpty())
break;
auto metadata = inode.metadata();
if (!metadata.isValid()) {
#ifdef VFS_DEBUG