Fixed a bug that symlink could not be read after restarting s3fs

This commit is contained in:
Takeshi Nakatani 2020-10-10 15:36:44 +00:00 committed by Andrew Gaul
parent 2188fb067e
commit 58750cc441

View File

@ -688,7 +688,7 @@ static FdEntity* get_local_fent(AutoFdEntity& autoent, const char* path, bool is
}
// open
time_t mtime = (!S_ISREG(stobj.st_mode) || S_ISLNK(stobj.st_mode)) ? -1 : stobj.st_mtime;
time_t mtime = (!S_ISREG(stobj.st_mode) && !S_ISLNK(stobj.st_mode)) ? -1 : stobj.st_mtime;
bool force_tmpfile = S_ISREG(stobj.st_mode) ? false : true;
if(NULL == (ent = autoent.Open(path, &meta, stobj.st_size, mtime, force_tmpfile, true))){