Refactored the get_object_attribute function

This commit is contained in:
Takeshi Nakatani 2017-05-05 10:02:21 +00:00
parent 51b3183cba
commit 864e20e1f2

View File

@ -421,15 +421,13 @@ static int get_object_attribute(const char* path, struct stat* pstbuf, headers_t
}
// Check cache.
pisforce = (NULL != pisforce ? pisforce : &forcedir);
strpath = path;
pisforce = (NULL != pisforce ? pisforce : &forcedir);
(*pisforce) = false;
strpath = path;
if(overcheck && string::npos != (Pos = strpath.find("_$folder$", 0))){
strpath = strpath.substr(0, Pos);
strpath += "/";
}
if(pisforce){
(*pisforce) = false;
}
if(StatCache::getStatCacheData()->GetStat(strpath, pstat, pheader, overcheck, pisforce)){
StatCache::getStatCacheData()->ChangeNoTruncateFlag(strpath, add_no_truncate_cache);
return 0;