Browse Source

gwtcwd of NetWare LibC gives a cwd with a volume information.

So using getcwdpath which gives with volume information.
getcwdpath gives with directory seperator as \ which is against our DEFAULT_SLASH of /. So finding and replacing \ with /

-- Kamesh
PHP-5.1
Anantha Kesari H Y 21 years ago
parent
commit
958803655e
  1. 17
      TSRM/tsrm_virtual_cwd.c

17
TSRM/tsrm_virtual_cwd.c

@ -42,6 +42,10 @@
# endif
#endif
#ifdef NETWARE
#include <fsio.h>
#endif
#ifndef HAVE_REALPATH
#define realpath(x,y) strcpy(y,x)
#endif
@ -206,7 +210,20 @@ CWD_API void virtual_cwd_startup(void)
char cwd[MAXPATHLEN];
char *result;
#ifdef NETWARE
result = getcwdpath(cwd, NULL, 1);
if(result)
{
char *c=cwd;
while(c = strchr(c, '\\'))
{
*c='/';
++c;
}
}
#else
result = getcwd(cwd, sizeof(cwd));
#endif
if (!result) {
cwd[0] = '\0';
}

Loading…
Cancel
Save