🐛 Fix npe

This commit is contained in:
Daniel 2024-01-20 20:56:14 +08:00
parent 9a9392c5af
commit 120a88db4c
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -154,6 +154,10 @@ func resetDuplicateBlocksOnFileSys() {
boxPath := filepath.Join(util.DataDir, box.ID) boxPath := filepath.Join(util.DataDir, box.ID)
var duplicatedTrees []*parse.Tree var duplicatedTrees []*parse.Tree
filepath.Walk(boxPath, func(path string, info os.FileInfo, err error) error { filepath.Walk(boxPath, func(path string, info os.FileInfo, err error) error {
if nil == info {
return nil
}
if info.IsDir() { if info.IsDir() {
if boxPath == path { if boxPath == path {
// 跳过根路径(笔记本文件夹) // 跳过根路径(笔记本文件夹)