Changeset 2857 in kBuild for trunk/src/lib/nt/kFsCache.c
- Timestamp:
- Sep 1, 2016 3:39:51 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/nt/kFsCache.c
r2856 r2857 494 494 { 495 495 if (pchDot[1] != '.') 496 pchDot = (const char *)kHlpMemChr(pchDot + 1, '.', &pszPath[cchPath] - pchDot - 1); 496 { 497 pchDot++; 498 pchDot = (const char *)kHlpMemChr(pchDot, '.', &pszPath[cchPath] - pchDot); 499 } 497 500 else 498 501 { 499 502 char ch; 500 if ( (ch = pchDot[2]) == '\0'503 if ( (ch = pchDot[2]) != '\0' 501 504 && IS_SLASH(ch)) 502 505 { … … 529 532 { 530 533 if (pwcDot[1] != '.') 531 pwcDot = wmemchr(pwcDot + 1, '.', &pwszPath[cwcPath] - pwcDot - 1); 534 { 535 pwcDot++; 536 pwcDot = wmemchr(pwcDot, '.', &pwszPath[cwcPath] - pwcDot); 537 } 532 538 else 533 539 { 534 540 wchar_t wch; 535 if ( (wch = pwcDot[2]) == '\0'541 if ( (wch = pwcDot[2]) != '\0' 536 542 && IS_SLASH(wch)) 537 543 { … … 1155 1161 *penmError = KFSLOOKUPERROR_DIR_READ_ERROR; 1156 1162 return K_TRUE; 1163 } 1164 1165 1166 /** 1167 * Does the initial directory populating or refreshes it if it has been 1168 * invalidated. 1169 * 1170 * This assumes the parent directory is opened. 1171 * 1172 * @returns K_TRUE on success, K_FALSE on error. 1173 * @param pCache The cache. 1174 * @param pDir The directory. 1175 * @param penmError Where to store K_FALSE explanation. Optional. 1176 */ 1177 KBOOL kFsCacheDirEnsurePopuplated(PKFSCACHE pCache, PKFSDIR pDir, KFSLOOKUPERROR *penmError) 1178 { 1179 KFSLOOKUPERROR enmIgnored; 1180 if ( pDir->fPopulated 1181 && ( pDir->Obj.uCacheGen == KFSOBJ_CACHE_GEN_IGNORE 1182 || pDir->Obj.uCacheGen == pCache->uGeneration) ) 1183 return K_TRUE; 1184 return kFsCachePopuplateOrRefreshDir(pCache, pDir, penmError ? penmError : &enmIgnored); 1157 1185 } 1158 1186
Note:
See TracChangeset
for help on using the changeset viewer.