X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Kernel%2Fvfs%2Fopen.c;h=40c1d39b3202fee7fe163e236cda3eeccc029c1c;hb=3662ceff5d51ba5a3c31796da73f8f5568f68209;hp=0bca8cac3c5b75fc9610c353b9a9aa37cbc6e450;hpb=3e11c7767641614fbb3fad38fffefa0da9e66919;p=tpg%2Facess2.git diff --git a/Kernel/vfs/open.c b/Kernel/vfs/open.c index 0bca8cac..40c1d39b 100644 --- a/Kernel/vfs/open.c +++ b/Kernel/vfs/open.c @@ -2,7 +2,7 @@ * AcessMicro VFS * - Open, Close and ChDir */ -#define DEBUG 1 +#define DEBUG 0 #include #include #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]);