Changed back to lottery scheduler, disabled debug
[tpg/acess2.git] / Kernel / vfs / open.c
index 0bca8ca..40c1d39 100644 (file)
@@ -2,7 +2,7 @@
  * AcessMicro VFS
  * - Open, Close and ChDir
  */
-#define DEBUG  1
+#define DEBUG  0
 #include <acess.h>
 #include <mm_virt.h>
 #include "vfs.h"
@@ -397,6 +397,17 @@ tVFS_Node *VFS_ParsePath(const char *Path, char **TruePath)
                retLength += nextSlash + 1;
        }
        
+       if( !curNode->FindDir ) {
+               if(curNode->Close)      curNode->Close(curNode);
+               if(TruePath) {
+                       free(*TruePath);
+                       *TruePath = NULL;
+               }
+               Log("FindDir fail on '%s'", Path);
+               LEAVE('n');
+               return NULL;
+       }
+       
        // Get last node
        LOG("VFS_ParsePath: FindDir(%p, '%s')", curNode, &Path[ofs]);
        tmpNode = curNode->FindDir(curNode, &Path[ofs]);

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