X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fvfs%2Fopen.c;h=cfb296b643e9e5e0187523639e907832eb9d5a28;hb=e4569a6ea3767c2d28079c7e695e3df9d068af39;hp=1536d1a0f2c21a6c5a02c3db7e1387c8a7b2222f;hpb=48743e39650eb1ef988380e9d95f27fd40d3a9ce;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/vfs/open.c b/KernelLand/Kernel/vfs/open.c index 1536d1a0..cfb296b6 100644 --- a/KernelLand/Kernel/vfs/open.c +++ b/KernelLand/Kernel/vfs/open.c @@ -59,6 +59,9 @@ char *VFS_GetAbsPath(const char *Path) if( chroot == NULL ) chroot = ""; chrootLen = strlen(chroot); + // Trim trailing slash off chroot + if( chrootLen && chroot[chrootLen - 1] == '/' ) + chrootLen -= 1; // Check if the path is already absolute if(Path[0] == '/') { @@ -269,14 +272,14 @@ restart_parse: // Check permissions on root of filesystem if( !VFS_CheckACL(curNode, VFS_PERM_EXECUTE) ) { - //Log("Permissions fail on '%s'", Path); + LOG("Permissions failure on '%s'", Path); goto _error; } // Check if the node has a FindDir method if( !curNode->Type->FindDir ) { - //Log("FindDir fail on '%s'", Path); + LOG("Finddir failure on '%s'", Path); goto _error; } LOG("FindDir{=%p}(%p, '%s')", curNode->Type->FindDir, curNode, pathEle);