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
commit 39d6b96d21
Notes: sideshowbarker 2024-07-19 16:11:34 +09:00

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