🐛 Windows 端部分系统上内核崩溃 https://github.com/siyuan-note/siyuan/issues/7806
This commit is contained in:
parent
d55af3966d
commit
55076cc89c
1 changed files with 6 additions and 1 deletions
|
@ -315,7 +315,12 @@ func existAvailabilityStatus(workspaceAbsPath string) bool {
|
|||
|
||||
logging.LogInfof("check workspace [%s] availability status", checkAbsPath)
|
||||
|
||||
ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED)
|
||||
runtime.LockOSThread()
|
||||
defer runtime.LockOSThread()
|
||||
if err := ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED); nil != err {
|
||||
logging.LogWarnf("initialize ole failed: %s", err)
|
||||
return false
|
||||
}
|
||||
defer ole.CoUninitialize()
|
||||
dir, file := filepath.Split(checkAbsPath)
|
||||
unknown, err := oleutil.CreateObject("Shell.Application")
|
||||
|
|
Loading…
Add table
Reference in a new issue