Changeset 44231 in vbox for trunk/src/VBox/Runtime/r3
- Timestamp:
- Jan 4, 2013 2:06:39 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 83065
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/dir-win.cpp
r39627 r44231 139 139 * it when adding the wildcard expression. 140 140 */ 141 size_t c chExpr;141 size_t cbExpr; 142 142 const char *pszExpr; 143 143 if (pDir->enmFilter == RTDIRFILTER_WINNT) 144 144 { 145 145 pszExpr = pDir->pszFilter; 146 c chExpr= pDir->cchFilter + 1;146 cbExpr = pDir->cchFilter + 1; 147 147 } 148 148 else 149 149 { 150 150 pszExpr = "*"; 151 c chExpr= sizeof("*");152 } 153 if (pDir->cchPath + c chExpr > RTPATH_MAX)151 cbExpr = sizeof("*"); 152 } 153 if (pDir->cchPath + cbExpr > RTPATH_MAX) 154 154 return VERR_FILENAME_TOO_LONG; 155 memcpy(pszPathBuf + pDir->cchPath, pszExpr, c chExpr);155 memcpy(pszPathBuf + pDir->cchPath, pszExpr, cbExpr); 156 156 157 157 … … 167 167 if (pDir->hDir != INVALID_HANDLE_VALUE) 168 168 pDir->fDataUnread = true; 169 /* theoretical case of an empty directory. */170 else if (GetLastError() == ERROR_NO_MORE_FILES)171 pDir->fDataUnread = false;172 169 else 173 rc = RTErrConvertFromWin32(GetLastError()); 170 { 171 DWORD dwErr = GetLastError(); 172 /* Theoretical case of an empty directory or more normal case of no matches. */ 173 if ( dwErr == ERROR_FILE_NOT_FOUND 174 || dwErr == ERROR_NO_MORE_FILES /* ???*/) 175 pDir->fDataUnread = false; 176 else 177 rc = RTErrConvertFromWin32(GetLastError()); 178 } 174 179 RTUtf16Free(pwszName); 175 180 }
Note:
See TracChangeset
for help on using the changeset viewer.