Changeset 21302 for trunk/src/kernel32/oslibdos.cpp
- Timestamp:
- Jun 18, 2009, 11:53:26 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/oslibdos.cpp
r10132 r21302 265 265 case ERROR_WRONG_DISK: //34 266 266 return ERROR_WRONG_DISK_W; 267 268 case ERROR_BAD_NETPATH: //53 269 return ERROR_BAD_NETPATH_W; 267 270 268 271 case ERROR_SHARING_BUFFER_EXCEEDED: //36 … … 1045 1048 // @@@AH 2001-06-02 Win2k SP2 returns error 2 in this case 1046 1049 int winError = error2WinError(rc); 1047 if (winError == ERROR_OPEN_FAILED_W || winError == ERROR_PATH_NOT_FOUND_W)1050 if (winError == ERROR_OPEN_FAILED_W) 1048 1051 { 1049 1052 //Windows returns ERROR_FILE_EXISTS if create new & file exists … … 2383 2386 { 2384 2387 FILESTATUS3 statusBuf; 2385 char lOemFileName[CCHMAXPATH];2388 char *lOemFileName; 2386 2389 char *lpszBackslash, *lpszColon; 2387 2390 APIRET rc; 2388 2391 2389 //testestest 2390 if(strlen(lpFileName) > CCHMAXPATH) DebugInt3(); 2391 //testestset 2392 lOemFileName = (char *)malloc(strlen(lpFileName)+64); 2393 lOemFileName[0] = 0; 2392 2394 2393 2395 //Convert file name from Windows to OS/2 codepage … … 2399 2401 { 2400 2402 lpszColon = CharPrevA(lOemFileName, lpszBackslash); 2401 if( lpszColon && *lpszColon != ':')2403 if(strlen(lOemFileName) > 1 && lpszColon && *lpszColon != ':') 2402 2404 {//only rootdir is allowed to have terminating backslash 2403 2405 *lpszBackslash = 0; … … 2420 2422 rc = DosQueryPathInfo(lOemFileName, FIL_STANDARD, &statusBuf, sizeof(statusBuf)); 2421 2423 } 2424 free(lOemFileName); 2422 2425 2423 2426 if(rc == NO_ERROR)
Note:
See TracChangeset
for help on using the changeset viewer.