mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-23 09:18:55 +00:00
Merge pull request #295 from ggtakec/fixissue
File opened with O_TRUNC is not flushed - changed #291
This commit is contained in:
commit
5af6d4bd82
@ -2026,8 +2026,10 @@ static int s3fs_open(const char* path, struct fuse_file_info* fi)
|
||||
}
|
||||
|
||||
if((unsigned int)fi->flags & O_TRUNC){
|
||||
st.st_size = 0;
|
||||
needs_flush = true;
|
||||
if(0 != st.st_size){
|
||||
st.st_size = 0;
|
||||
needs_flush = true;
|
||||
}
|
||||
}
|
||||
if(!S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)){
|
||||
st.st_mtime = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user