diff --git a/src/fdcache.cpp b/src/fdcache.cpp index 2e96de5..7b7c132 100644 --- a/src/fdcache.cpp +++ b/src/fdcache.cpp @@ -601,7 +601,7 @@ int FdEntity::Open(ssize_t size, time_t time) fd = -1; return (0 == errno ? -EIO : -errno); } - if(static_cast(st.st_size) != pagelist.Size()){ + if((-1 != size && static_cast(size) != pagelist.Size()) || static_cast(st.st_size) != pagelist.Size()){ is_csf_loaded = false; // reinitializing if(-1 == size){ size = st.st_size;