This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit 1f01854
1 parent 41498e7 commit 1f01854 Copy full SHA for 1f01854
File tree 2 files changed +4
-20
lines changed
2 files changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -501,10 +501,6 @@ Warning:
501
501
502
502
create , _ , _ := req .Option ("create" ).Bool ()
503
503
trunc , _ , _ := req .Option ("truncate" ).Bool ()
504
- flush , set , _ := req .Option ("flush" ).Bool ()
505
- if ! set {
506
- flush = true
507
- }
508
504
509
505
nd , err := req .InvocContext ().GetNode ()
510
506
if err != nil {
@@ -528,18 +524,7 @@ Warning:
528
524
return
529
525
}
530
526
531
- if flush {
532
- defer func () {
533
- fi .Close ()
534
- err := mfs .FlushPath (nd .FilesRoot , path )
535
- if err != nil {
536
- res .SetError (err , cmds .ErrNormal )
537
- return
538
- }
539
- }()
540
- } else {
541
- defer fi .Sync ()
542
- }
527
+ defer fi .Close ()
543
528
544
529
if trunc {
545
530
if err := fi .Truncate (0 ); err != nil {
Original file line number Diff line number Diff line change @@ -95,13 +95,12 @@ func (fi *File) flushUp() error {
95
95
return err
96
96
}
97
97
98
- // name := fi.name
99
- // parent := fi.parent
98
+ name := fi .name
99
+ parent := fi .parent
100
100
101
101
// explicit unlock *only* before closeChild call
102
102
fi .Unlock ()
103
- return nil
104
- //return parent.closeChild(name, nd)
103
+ return parent .closeChild (name , nd )
105
104
}
106
105
107
106
// Sync flushes the changes in the file to disk
You can’t perform that action at this time.
0 commit comments