mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
ensure correct file mode
This commit is contained in:
parent
32a1f22730
commit
e8e0d629af
|
@ -6,6 +6,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"math"
|
"math"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||||
|
@ -190,7 +191,7 @@ func (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) error {
|
||||||
fh.f.entry.Attributes.Gid = req.Gid
|
fh.f.entry.Attributes.Gid = req.Gid
|
||||||
fh.f.entry.Attributes.Mtime = time.Now().Unix()
|
fh.f.entry.Attributes.Mtime = time.Now().Unix()
|
||||||
fh.f.entry.Attributes.Crtime = time.Now().Unix()
|
fh.f.entry.Attributes.Crtime = time.Now().Unix()
|
||||||
fh.f.entry.Attributes.FileMode = uint32(0666 &^ fh.f.wfs.option.Umask)
|
fh.f.entry.Attributes.FileMode = uint32(os.FileMode(fh.f.entry.Attributes.FileMode) &^ fh.f.wfs.option.Umask)
|
||||||
fh.f.entry.Attributes.Collection = fh.dirtyPages.collection
|
fh.f.entry.Attributes.Collection = fh.dirtyPages.collection
|
||||||
fh.f.entry.Attributes.Replication = fh.dirtyPages.replication
|
fh.f.entry.Attributes.Replication = fh.dirtyPages.replication
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue