mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
🎨 文件系统读取或写入失败时退出内核 https://github.com/siyuan-note/siyuan/issues/7707
This commit is contained in:
parent
60f390d9e0
commit
7a078d3689
18 changed files with 3 additions and 162 deletions
|
|
@ -527,19 +527,6 @@ func (box *Box) UpdateHistoryGenerated() {
|
|||
boxLatestHistoryTime[box.ID] = time.Now()
|
||||
}
|
||||
|
||||
func TryAccessFileByBlockID(id string) (ok bool) {
|
||||
bt := treenode.GetBlockTree(id)
|
||||
if nil == bt {
|
||||
return
|
||||
}
|
||||
p := filepath.Join(util.DataDir, bt.BoxID, bt.Path)
|
||||
|
||||
if !gulu.File.IsExist(p) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func getBoxesByPaths(paths []string) (ret map[string]*Box) {
|
||||
ret = map[string]*Box{}
|
||||
for _, p := range paths {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue