mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-25 01:36:09 +01:00
🎨 使用第三方同步盘时弹出提示并退出内核 https://github.com/siyuan-note/siyuan/issues/7683
This commit is contained in:
parent
d7473b7a6d
commit
5f6d1eac9a
17 changed files with 69 additions and 171 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue