[Sphere-axis-commits] CVS: axissvr axissvr.cfg,1.1.1.1,1.2 gwhogsvr.cpp,1.11,1.12
Brought to you by:
pesterle
From: Philip E. <pes...@us...> - 2002-05-21 17:24:38
|
Update of /cvsroot/sphere-axis/axissvr In directory usw-pr-cvs1:/tmp/cvs-serv32703 Modified Files: axissvr.cfg gwhogsvr.cpp Log Message: Improved handling of subdirectories in the GetDirInfo function. Index: axissvr.cfg =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/axissvr.cfg,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** axissvr.cfg 21 Apr 2001 01:42:43 -0000 1.1.1.1 --- axissvr.cfg 21 May 2002 17:02:17 -0000 1.2 *************** *** 37,41 **** # ALLOWEDPATHS specifies the relative paths which can be accessed with the # raw editor function in the Axis client. Multiple paths can be specified, and ! # should be delimited by a colon. ALLOWEDPATHS speech:log # --- 37,42 ---- # ALLOWEDPATHS specifies the relative paths which can be accessed with the # raw editor function in the Axis client. Multiple paths can be specified, and ! # should be delimited by a colon. If you wish to use subdiretories, use the ! # complete relative path (e.g. scripts:scripts/test:scripts/speech:etc) ALLOWEDPATHS speech:log # Index: gwhogsvr.cpp =================================================================== RCS file: /cvsroot/sphere-axis/axissvr/gwhogsvr.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** gwhogsvr.cpp 15 May 2002 03:22:29 -0000 1.11 --- gwhogsvr.cpp 21 May 2002 17:02:17 -0000 1.12 *************** *** 39,43 **** #endif ! #define SVR_VERSION "0.13.0.1" #ifdef WIN32 #define SVR_PLATFORM "Win32" --- 39,43 ---- #endif ! #define SVR_VERSION "0.13.0.2" #ifdef WIN32 #define SVR_PLATFORM "Win32" *************** *** 2250,2253 **** --- 2250,2257 ---- char szPath[MAX_PATH]; sprintf(szPath, "%s", pszPathname); + // Make sure the slashes are in the correct direction + for ( int i = 0; i < strlen(szPath); i++ ) + if ( szPath[i] == '\\' ) + szPath[i] = '/'; if ( szPath[strlen(szPath) - 1] == '/' ) szPath[strlen(szPath) - 1] = 0x00; *************** *** 2256,2259 **** --- 2260,2264 ---- { // Handle the error + printf("Unable to open directdory %s\n", szPath); Send(sock, szEOF, strlen(szEOF)); return; *************** *** 2269,2273 **** struct stat filestat; memset(&filestat, 0x00, sizeof(filestat)); ! sprintf(szEntry, "%s/%s", szPath, direntp->d_name); stat(szEntry, &filestat); --- 2274,2281 ---- struct stat filestat; memset(&filestat, 0x00, sizeof(filestat)); ! if ( strcmp(szPath, ".") == 0 ) ! sprintf(szEntry, direntp->d_name); ! else ! sprintf(szEntry, "%s/%s", szPath, direntp->d_name); stat(szEntry, &filestat); *************** *** 2280,2284 **** while ( pszTok != NULL ) { ! if ( strcmp(pszTok, direntp->d_name) == 0 ) { bAllowed = TRUE; --- 2288,2292 ---- while ( pszTok != NULL ) { ! if ( strcmp(pszTok, szEntry) == 0 ) { bAllowed = TRUE; |