Merge branch 'master' of git://ted.mutabah.net/acess2
[tpg/acess2.git] / KernelLand / Kernel / vfs / dir.c
index cd45121..911eff6 100644 (file)
@@ -74,7 +74,7 @@ int VFS_MkNod(const char *Path, Uint Flags)
        }
 
        // Permissions Check
-       if( !VFS_CheckACL(parent, VFS_PERM_EXECUTE|VFS_PERM_WRITE) ) {
+       if( !VFS_CheckACL(parent, VFS_PERM_EXEC|VFS_PERM_WRITE) ) {
                errno = EACCES;
                goto _error;
        }
@@ -104,9 +104,11 @@ int VFS_MkNod(const char *Path, Uint Flags)
        return ret==NULL;
 
 _error:
-       _CloseNode(parent);
-       ASSERT(mountpt->OpenHandleCount>0);
-       mountpt->OpenHandleCount --;
+       if( parent ) {
+               _CloseNode(parent);
+               ASSERT(mountpt->OpenHandleCount>0);
+               mountpt->OpenHandleCount --;
+       }
        free(absPath);
        LEAVE('i', -1);
        return -1;
@@ -178,10 +180,12 @@ int VFS_ReadDir(int FD, char *Dest)
                return 0;
        }
        
+       #if 0
        if(h->Node->Size != (Uint64)-1 && h->Position >= h->Node->Size) {
                //LEAVE('i', 0);
                return 0;
        }
+       #endif
        
        do {
                rv = h->Node->Type->ReadDir(h->Node, h->Position, Dest);

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