Kernel/vfs - Fixed edge case bug with chroots
[tpg/acess2.git] / KernelLand / Kernel / vfs / fs / root.c
index 9fa1732..bee2030 100644 (file)
@@ -142,14 +142,20 @@ tVFS_Node *Root_FindDir(tVFS_Node *Node, const char *Name)
        tRamFS_File     *parent = Node->ImplPtr;
        tRamFS_File     *child = parent->Data.FirstChild;
        
+       ENTER("pNode sName", Node, Name);
        //Log("Root_FindDir: (Node=%p, Name='%s')", Node, Name);
        
        for(;child;child = child->Next)
        {
                //Log(" Root_FindDir: strcmp('%s', '%s')", child->Node.Name, Name);
-               if(strcmp(child->Name, Name) == 0)      return &child->Node;
+               LOG("child->Name = '%s'", child->Name);
+               if(strcmp(child->Name, Name) == 0) {
+                       LEAVE('p', &child->Node);
+                       return &child->Node;
+               }
        }
        
+       LEAVE('n');
        return NULL;
 }
 

UCC git Repository :: git.ucc.asn.au