update to r322, this only works when local file cache is turned on. Initial 'make check' erroneously passed

git-svn-id: http://s3fs.googlecode.com/svn/trunk@323 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
ben.lemasurier@gmail.com 2011-02-22 22:28:57 +00:00
parent 0fb4427444
commit 9b5f694497

View File

@ -3021,8 +3021,8 @@ static int s3fs_flush(const char *path, struct fuse_file_info *fi) {
// etag (md5), skip uploading the file
remote_md5 = trim(meta["ETag"], "\"");
local_md5 = md5sum(fd);
if(result != 0 || local_md5 == remote_md5)
return result;
if(result != 0 || (local_md5 == remote_md5 && use_cache.size() > 0))
return result;
meta["x-amz-meta-mtime"] = str(time(NULL));
return put_local_fd(path, meta, fd);