mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 21:47:43 +00:00
Make chdir("/") work.
It surprisingly wasn't possible to resolve the path "/".
This commit is contained in:
parent
b8264e7d47
commit
39d6b96d21
1 changed files with 2 additions and 0 deletions
|
@ -496,6 +496,8 @@ InodeIdentifier VirtualFileSystem::resolvePath(const String& path, int& error, I
|
||||||
for (unsigned i = 0; i < parts.size(); ++i) {
|
for (unsigned i = 0; i < parts.size(); ++i) {
|
||||||
bool wasRootInodeAtHeadOfLoop = inode.isRootInode();
|
bool wasRootInodeAtHeadOfLoop = inode.isRootInode();
|
||||||
auto& part = parts[i];
|
auto& part = parts[i];
|
||||||
|
if (part.isEmpty())
|
||||||
|
break;
|
||||||
auto metadata = inode.metadata();
|
auto metadata = inode.metadata();
|
||||||
if (!metadata.isValid()) {
|
if (!metadata.isValid()) {
|
||||||
#ifdef VFS_DEBUG
|
#ifdef VFS_DEBUG
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue