X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fvfs%2Fopen.c;h=a886c45113afadb939540658d23c798fce7f9990;hb=ae3a0bf446529bfb50eb91a0fb90b72140d9f2ed;hp=1845b7a43cc55ca97935b4e636f37921fefe756e;hpb=6e41a8a3aa767cd5aeddbad393ce4f637a47a367;p=tpg%2Facess2.git diff --git a/Kernel/vfs/open.c b/Kernel/vfs/open.c index 1845b7a4..a886c451 100644 --- a/Kernel/vfs/open.c +++ b/Kernel/vfs/open.c @@ -55,12 +55,9 @@ char *VFS_GetAbsPath(const char *Path) } // - Fetch ChRoot - if( chroot == NULL ) { + if( chroot == NULL ) chroot = ""; - chrootLen = 0; - } else { - chrootLen = strlen(chroot); - } + chrootLen = strlen(chroot); // Check if the path is already absolute if(Path[0] == '/') { @@ -155,7 +152,8 @@ char *VFS_GetAbsPath(const char *Path) ret[iPos2] = 0; // Prepend the chroot - memcpy( ret, chroot, chrootLen ); + if(chrootLen) + memcpy( ret, chroot, chrootLen ); LEAVE('s', ret); // Log_Debug("VFS", "VFS_GetAbsPath: RETURN '%s'", ret); @@ -348,6 +346,7 @@ restart_parse: } curNode->Read( curNode, 0, curNode->Size, path_buffer ); path_buffer[ curNode->Size ] = '\0'; + LOG("path_buffer = '%s'", path_buffer); strcat(path_buffer, Path + ofs+nextSlash); Path = path_buffer; @@ -356,6 +355,7 @@ restart_parse: } // EVIL: Goto :) + LOG("Symlink -> '%s', restart", Path); goto restart_parse; } @@ -454,7 +454,7 @@ int VFS_int_CreateHandle( tVFS_Node *Node, tVFS_Mount *Mount, int Mode ) { int i; - ENTER("pNode pMount iMode", Node, Mount, Mode); + ENTER("pNode pMount xMode", Node, Mount, Mode); i = 0; i |= (Mode & VFS_OPENFLAG_EXEC) ? VFS_PERM_EXECUTE : 0;