Fix large file chunks deleted by mistake (#4678)

This commit is contained in:
wusong
2023-07-17 22:52:14 +08:00
committed by GitHub
parent 358b3a4894
commit 33b9192536
2 changed files with 12 additions and 5 deletions

View File

@@ -1,11 +1,12 @@
package mount
import (
"github.com/hanwen/go-fuse/v2/fuse"
sys "golang.org/x/sys/unix"
"runtime"
"strings"
"syscall"
"github.com/hanwen/go-fuse/v2/fuse"
sys "golang.org/x/sys/unix"
)
const (
@@ -131,6 +132,11 @@ func (wfs *WFS) SetXAttr(cancel <-chan struct{}, input *fuse.SetXAttrIn, attr st
entry.Extended[XATTR_PREFIX+attr] = data
}
if fh != nil {
fh.dirtyMetadata = true
return fuse.OK
}
return wfs.saveEntry(path, entry)
}