mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-10 14:50:58 +00:00
Always flush open files with O_CREAT flag (#1879)
Previously s3fs only created files that had dirty data and not those
with zero-bytes. Regression from
771bbfeac5
. References #1013. Found
via pjdfstest. References #1589.
This commit is contained in:
parent
0c75a63184
commit
f6ed972926
@ -1343,7 +1343,7 @@ int FdEntity::RowFlush(int fd, const char* tpath, bool force_sync)
|
|||||||
if(pseudo_fd_map.end() == miter || NULL == miter->second){
|
if(pseudo_fd_map.end() == miter || NULL == miter->second){
|
||||||
return -EBADF;
|
return -EBADF;
|
||||||
}
|
}
|
||||||
if(!miter->second->Writable()){
|
if(!miter->second->Writable() && !(miter->second->GetFlags() & O_CREAT)){
|
||||||
// If the entity is opened read-only, it will end normally without updating.
|
// If the entity is opened read-only, it will end normally without updating.
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user