Fixed bugs( Issue 368 )

1) Fixed Issue 368
   Fixed a bug that s3fs could not update local cache.

   (Issue 368)1.73: Updating existing file on server 'a' does not change length of file on server 'b'




git-svn-id: http://s3fs.googlecode.com/svn/trunk@481 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
ggtakec@gmail.com 2013-08-30 02:25:27 +00:00
parent 3b393fe159
commit d45f4707ea

View File

@ -601,7 +601,7 @@ int FdEntity::Open(ssize_t size, time_t time)
fd = -1;
return (0 == errno ? -EIO : -errno);
}
if(static_cast<size_t>(st.st_size) != pagelist.Size()){
if((-1 != size && static_cast<size_t>(size) != pagelist.Size()) || static_cast<size_t>(st.st_size) != pagelist.Size()){
is_csf_loaded = false; // reinitializing
if(-1 == size){
size = st.st_size;