Skip to content

Commit 7eca48e

Browse files
authored
#1355 🐛bug: fix cache time null (#1357)
1 parent b51a111 commit 7eca48e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: Packaging
4545
run: tar -zcvf paddleflow-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz output/
4646
- name: Uploading assets
47-
uses: actions/upload-artifact@v3
47+
uses: actions/upload-artifact@v4
4848
with:
4949
name: paddleflow-${{ matrix.goos }}-${{ matrix.goarch }}
5050
path: paddleflow-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz

pkg/fs/client/meta/meta_kv.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,6 @@ func (m *kvMeta) Symlink(ctx *Context, parent Ino, name string, path string, ino
955955
// todo:: file mode including type and unix permission, add smode to transe
956956
attr.Nlink = 1
957957
attr.Size = uint64(len(path))
958-
insertInodeItem_.attr = *attr
959958
insertInodeItem_.parentIno = parent
960959
insertInodeItem_.fileHandles = 1
961960
insertInodeItem_.name = []byte(name)
@@ -993,6 +992,8 @@ func (m *kvMeta) Symlink(ctx *Context, parent Ino, name string, path string, ino
993992
attr.Mtimensec = uint32(now.Nanosecond())
994993
attr.Ctime = now.Unix()
995994
attr.Ctimensec = uint32(now.Nanosecond())
995+
// 结构体中是没有指针,默认是深拷贝,等待 attr 赋值完成进行深拷贝
996+
insertInodeItem_.attr = *attr
996997
insertEntryItem_ := &entryItem{
997998
ino: ino,
998999
mode: attr.Mode,

0 commit comments

Comments
 (0)