File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ pub struct DirEntry {
46
46
pub struct OpenOptions {
47
47
read : bool ,
48
48
write : bool ,
49
+ append : bool ,
49
50
dirflags : wasi:: Lookupflags ,
50
51
fdflags : wasi:: Fdflags ,
51
52
oflags : wasi:: Oflags ,
@@ -270,8 +271,9 @@ impl OpenOptions {
270
271
}
271
272
}
272
273
273
- pub fn append ( & mut self , set : bool ) {
274
- self . fdflag ( wasi:: FDFLAGS_APPEND , set) ;
274
+ pub fn append ( & mut self , append : bool ) {
275
+ self . append = append;
276
+ self . fdflag ( wasi:: FDFLAGS_APPEND , append) ;
275
277
}
276
278
277
279
pub fn dsync ( & mut self , set : bool ) {
@@ -321,7 +323,7 @@ impl OpenOptions {
321
323
base |= wasi:: RIGHTS_FD_READ ;
322
324
base |= wasi:: RIGHTS_FD_READDIR ;
323
325
}
324
- if self . write {
326
+ if self . write || self . append {
325
327
base |= wasi:: RIGHTS_FD_WRITE ;
326
328
base |= wasi:: RIGHTS_FD_DATASYNC ;
327
329
base |= wasi:: RIGHTS_FD_ALLOCATE ;
You can’t perform that action at this time.
0 commit comments