🎨 使用第三方同步盘时弹出提示并退出内核 https://github.com/siyuan-note/siyuan/issues/7683

This commit is contained in:
Liang Ding 2023-03-19 00:12:28 +08:00
parent d7473b7a6d
commit 5f6d1eac9a
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
17 changed files with 69 additions and 171 deletions

View file

@ -17,7 +17,6 @@
package api
import (
"errors"
"fmt"
"net/http"
"path"
@ -27,7 +26,6 @@ import (
"github.com/88250/gulu"
"github.com/gin-gonic/gin"
"github.com/siyuan-note/filelock"
"github.com/siyuan-note/siyuan/kernel/filesys"
"github.com/siyuan-note/siyuan/kernel/model"
"github.com/siyuan-note/siyuan/kernel/util"
@ -691,11 +689,11 @@ func getDoc(c *gin.Context) {
}
blockCount, content, parentID, parent2ID, rootID, typ, eof, scroll, boxID, docPath, isBacklinkExpand, err := model.GetDoc(startID, endID, id, index, keyword, mode, size, isBacklink)
if errors.Is(err, filelock.ErrUnableAccessFile) {
ret.Code = 2
ret.Data = id
return
}
//if errors.Is(err, filelock.ErrUnableAccessFile) {
// ret.Code = 2
// ret.Data = id
// return
//}
if model.ErrBlockNotFound == err {
ret.Code = 3
return