From 120a88db4cb6aaeb17450099e6782ddc0b39004c Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 20 Jan 2024 20:56:14 +0800 Subject: [PATCH] :bug: Fix npe --- kernel/model/index_fix.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/model/index_fix.go b/kernel/model/index_fix.go index 334684a90..4d1579fbd 100644 --- a/kernel/model/index_fix.go +++ b/kernel/model/index_fix.go @@ -154,6 +154,10 @@ func resetDuplicateBlocksOnFileSys() { boxPath := filepath.Join(util.DataDir, box.ID) var duplicatedTrees []*parse.Tree filepath.Walk(boxPath, func(path string, info os.FileInfo, err error) error { + if nil == info { + return nil + } + if info.IsDir() { if boxPath == path { // 跳过根路径(笔记本文件夹)