From 6da4e4b5a8abe8479b27e28eb218c63f8d14488b Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 12 Dec 2025 18:04:46 +0800 Subject: [PATCH] :art: Fix https://github.com/siyuan-note/siyuan/issues/16558 Signed-off-by: Daniel <845765@qq.com> --- kernel/go.mod | 6 +++--- kernel/go.sum | 12 ++++++------ kernel/model/assets.go | 4 ++++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/kernel/go.mod b/kernel/go.mod index 9d949e3b2..e1ec0e7fd 100644 --- a/kernel/go.mod +++ b/kernel/go.mod @@ -61,7 +61,7 @@ require ( github.com/siyuan-note/dejavu v0.0.0-20251206130752-28126fa5ecd1 github.com/siyuan-note/encryption v0.0.0-20251120032857-3ddc3c2cc49f github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97 - github.com/siyuan-note/filelock v0.0.0-20251212093559-e6b996c59496 + github.com/siyuan-note/filelock v0.0.0-20251212095217-08318833e008 github.com/siyuan-note/httpclient v0.0.0-20251119144307-63b815d7d198 github.com/siyuan-note/logging v0.0.0-20251209020516-52f1a2f65ec5 github.com/siyuan-note/riff v0.0.0-20251022131846-228528e70754 @@ -164,8 +164,8 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/qiniu/go-sdk/v7 v7.25.5 // indirect - github.com/quic-go/qpack v0.6.0 // indirect - github.com/quic-go/quic-go v0.57.1 // indirect + github.com/quic-go/qpack v0.5.1 // indirect + github.com/quic-go/quic-go v0.56.0 // indirect github.com/refraction-networking/utls v1.8.1 // indirect github.com/restic/chunker v0.4.0 // indirect github.com/richardlehane/mscfb v1.0.4 // indirect diff --git a/kernel/go.sum b/kernel/go.sum index 529f4e91f..8425fce58 100644 --- a/kernel/go.sum +++ b/kernel/go.sum @@ -340,10 +340,10 @@ github.com/qiniu/dyn v1.3.0/go.mod h1:E8oERcm8TtwJiZvkQPbcAh0RL8jO1G0VXJMW3FAWdk github.com/qiniu/go-sdk/v7 v7.25.5 h1:BZAZhrYC7vrw9NPnNbFi1K8xucoz29s7sEGWap77i2Q= github.com/qiniu/go-sdk/v7 v7.25.5/go.mod h1:dmKtJ2ahhPWFVi9o1D5GemmWoh/ctuB9peqTowyTO8o= github.com/qiniu/x v1.10.5/go.mod h1:03Ni9tj+N2h2aKnAz+6N0Xfl8FwMEDRC2PAlxekASDs= -github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= -github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= -github.com/quic-go/quic-go v0.57.1 h1:25KAAR9QR8KZrCZRThWMKVAwGoiHIrNbT72ULHTuI10= -github.com/quic-go/quic-go v0.57.1/go.mod h1:ly4QBAjHA2VhdnxhojRsCUOeJwKYg+taDlos92xb1+s= +github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= +github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg= +github.com/quic-go/quic-go v0.56.0 h1:q/TW+OLismmXAehgFLczhCDTYB3bFmua4D9lsNBWxvY= +github.com/quic-go/quic-go v0.56.0/go.mod h1:9gx5KsFQtw2oZ6GZTyh+7YEvOxWCL9WZAepnHxgAo6c= github.com/radovskyb/watcher v1.0.7 h1:AYePLih6dpmS32vlHfhCeli8127LzkIgwJGcwwe8tUE= github.com/radovskyb/watcher v1.0.7/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm+ZuvsUYIg= github.com/refraction-networking/utls v1.8.1 h1:yNY1kapmQU8JeM1sSw2H2asfTIwWxIkrMJI0pRUOCAo= @@ -382,8 +382,8 @@ github.com/siyuan-note/encryption v0.0.0-20251120032857-3ddc3c2cc49f h1:HSgJKIAM github.com/siyuan-note/encryption v0.0.0-20251120032857-3ddc3c2cc49f/go.mod h1:JE3S9VuJqTggyfhjesNDuqvqrRvwG3IctFjXXchLx1M= github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97 h1:lM5v8BfNtbOL5jYwhCdMYBcYtr06IYBKjjSLAPMKTM8= github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97/go.mod h1:1/nGgthl89FPA7GzAcEWKl6zRRnfgyTjzLZj9bW7kuw= -github.com/siyuan-note/filelock v0.0.0-20251212093559-e6b996c59496 h1:vLKRrWPV5g5oeAkQpTa733hxEPXu3J47U59H52/A+VM= -github.com/siyuan-note/filelock v0.0.0-20251212093559-e6b996c59496/go.mod h1:y/JuRGZ26bWVBebGQ6PJBtGq4n0jFBqjRHJ86emdK0w= +github.com/siyuan-note/filelock v0.0.0-20251212095217-08318833e008 h1:3wEmNS4eZkxwm1rhXDhVK5Y0o/GKAZtfe1VV584BF+A= +github.com/siyuan-note/filelock v0.0.0-20251212095217-08318833e008/go.mod h1:9OhXAyOkSXwuLvNCZk2aFMo0nOldyO3f2hMJEnkuT30= github.com/siyuan-note/httpclient v0.0.0-20251119144307-63b815d7d198 h1:NCFtk65n+a6oo+nIXnYPx3jCgs3O2uvvihnD7aRy/ZE= github.com/siyuan-note/httpclient v0.0.0-20251119144307-63b815d7d198/go.mod h1:w8ZKhKvcOr6lXsfxGmXQQTcIlVYWKhesB5IaXC+3OkA= github.com/siyuan-note/logging v0.0.0-20251209020516-52f1a2f65ec5 h1:bIMoJAAf3tV0xYcN+N2Vw7Ot/LbVxuz715o1rn1GDto= diff --git a/kernel/model/assets.go b/kernel/model/assets.go index 4a3be1018..7b0795aaf 100644 --- a/kernel/model/assets.go +++ b/kernel/model/assets.go @@ -682,6 +682,8 @@ func RemoveUnusedAssets() (ret []string) { if removeErr := filelock.RemoveWithoutFatal(absPath); removeErr != nil { logging.LogErrorf("remove unused asset [%s] failed: %s", absPath, removeErr) + util.PushErrMsg(fmt.Sprintf("%s", removeErr), 7000) + return } util.RemoveAssetText(unusedAsset) } @@ -722,6 +724,8 @@ func RemoveUnusedAsset(p string) (ret string) { if err = filelock.RemoveWithoutFatal(absPath); err != nil { logging.LogErrorf("remove unused asset [%s] failed: %s", absPath, err) + util.PushErrMsg(fmt.Sprintf("%s", err), 7000) + return } ret = absPath