mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-16 17:10:53 +08:00
🐛 Windows 端部分系统上内核崩溃 https://github.com/siyuan-note/siyuan/issues/7806
This commit is contained in:
parent
5606f3efd5
commit
db95671a65
@ -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…
Reference in New Issue
Block a user