diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-12-28 22:37:18 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-12-28 22:37:18 -0800 |
| commit | a8af1e3f5feee959c4281b5439a08eb2ffbc3ee3 (patch) | |
| tree | c7cdab2cb786dc35745451599ffce6a3851f8ca7 | |
| parent | ba9b7b62d785c0bd079b26ed3dc370e025ef1f08 (diff) | |
| download | seaweedfs-a8af1e3f5feee959c4281b5439a08eb2ffbc3ee3.tar.xz seaweedfs-a8af1e3f5feee959c4281b5439a08eb2ffbc3ee3.zip | |
set attributes include crtime
| -rw-r--r-- | weed/filesys/file.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/filesys/file.go b/weed/filesys/file.go index fd7903b20..a1f2f7fbc 100644 --- a/weed/filesys/file.go +++ b/weed/filesys/file.go @@ -97,6 +97,10 @@ func (file *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *f file.entry.Attributes.Gid = req.Gid } + if req.Valid.Crtime() { + file.entry.Attributes.Crtime = req.Crtime.Unix() + } + if req.Valid.Mtime() { file.entry.Attributes.Mtime = req.Mtime.Unix() } |
