mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🎨 改进 Windows 端第三方同步盘检测 https://github.com/siyuan-note/siyuan/issues/7777
This commit is contained in:
parent
f3d572a8f6
commit
483b79bcf1
1 changed files with 9 additions and 0 deletions
|
|
@ -294,6 +294,10 @@ func existAvailabilityStatus(workspaceAbsPath string) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !gulu.File.IsExist(workspaceAbsPath) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
// 改进 Windows 端第三方同步盘检测 https://github.com/siyuan-note/siyuan/issues/7777
|
// 改进 Windows 端第三方同步盘检测 https://github.com/siyuan-note/siyuan/issues/7777
|
||||||
|
|
||||||
defer logging.Recover()
|
defer logging.Recover()
|
||||||
|
|
@ -303,6 +307,11 @@ func existAvailabilityStatus(workspaceAbsPath string) bool {
|
||||||
dataAbsPath := filepath.Join(workspaceAbsPath, "data")
|
dataAbsPath := filepath.Join(workspaceAbsPath, "data")
|
||||||
dir, file := filepath.Split(dataAbsPath)
|
dir, file := filepath.Split(dataAbsPath)
|
||||||
|
|
||||||
|
if !gulu.File.IsExist(dataAbsPath) {
|
||||||
|
dataAbsPath = workspaceAbsPath
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
unknown, err := oleutil.CreateObject("Shell.Application")
|
unknown, err := oleutil.CreateObject("Shell.Application")
|
||||||
if nil != err {
|
if nil != err {
|
||||||
logging.LogWarnf("create shell application failed: %s", err)
|
logging.LogWarnf("create shell application failed: %s", err)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue