mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
🎨 改进 Windows 端第三方同步盘检测 Fix https://github.com/siyuan-note/siyuan/issues/7777
This commit is contained in:
parent
aa78932167
commit
25c2901eda
3 changed files with 24 additions and 4 deletions
|
|
@ -323,9 +323,27 @@ func existAvailabilityStatus(workspaceAbsPath string) bool {
|
|||
return false
|
||||
}
|
||||
defer shell.Release()
|
||||
folderObj := oleutil.MustCallMethod(shell, "NameSpace", dir).ToIDispatch()
|
||||
fileObj := oleutil.MustCallMethod(folderObj, "ParseName", file).ToIDispatch()
|
||||
value := oleutil.MustCallMethod(folderObj, "GetDetailsOf", fileObj, 303)
|
||||
|
||||
result, err := oleutil.CallMethod(shell, "NameSpace", dir)
|
||||
if nil != err {
|
||||
logging.LogWarnf("call shell [NameSpace] failed: %s", err)
|
||||
return false
|
||||
}
|
||||
folderObj := result.ToIDispatch()
|
||||
|
||||
result = oleutil.MustCallMethod(folderObj, "ParseName", file)
|
||||
if nil != err {
|
||||
logging.LogWarnf("call shell [ParseName] failed: %s", err)
|
||||
return false
|
||||
}
|
||||
fileObj := result.ToIDispatch()
|
||||
|
||||
result, err = oleutil.CallMethod(folderObj, "GetDetailsOf", fileObj, 303)
|
||||
if nil != err {
|
||||
logging.LogWarnf("call shell [GetDetailsOf] failed: %s", err)
|
||||
return false
|
||||
}
|
||||
value := result
|
||||
if nil == value {
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue