mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 增加 kernel.log https://github.com/siyuan-note/siyuan/issues/7789
This commit is contained in:
parent
f534675464
commit
a85c61d3c1
7 changed files with 57 additions and 39 deletions
|
|
@ -244,12 +244,11 @@ func checkFileSysStatus() {
|
|||
}
|
||||
|
||||
func IsCloudDrivePath(workspaceAbsPath string) bool {
|
||||
absPathLower := strings.ToLower(workspaceAbsPath)
|
||||
if isICloudPath(absPathLower) {
|
||||
if isICloudPath(workspaceAbsPath) {
|
||||
return true
|
||||
}
|
||||
|
||||
if isKnownCloudDrivePath(absPathLower) {
|
||||
if isKnownCloudDrivePath(workspaceAbsPath) {
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
@ -260,17 +259,20 @@ func IsCloudDrivePath(workspaceAbsPath string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func isKnownCloudDrivePath(workspaceAbsPathLower string) bool {
|
||||
func isKnownCloudDrivePath(workspaceAbsPath string) bool {
|
||||
workspaceAbsPathLower := strings.ToLower(workspaceAbsPath)
|
||||
return strings.Contains(workspaceAbsPathLower, "onedrive") || strings.Contains(workspaceAbsPathLower, "dropbox") ||
|
||||
strings.Contains(workspaceAbsPathLower, "google drive") || strings.Contains(workspaceAbsPathLower, "pcloud") ||
|
||||
strings.Contains(workspaceAbsPathLower, "坚果云")
|
||||
}
|
||||
|
||||
func isICloudPath(workspaceAbsPathLower string) (ret bool) {
|
||||
func isICloudPath(workspaceAbsPath string) (ret bool) {
|
||||
if !gulu.OS.IsDarwin() {
|
||||
return false
|
||||
}
|
||||
|
||||
workspaceAbsPathLower := strings.ToLower(workspaceAbsPath)
|
||||
|
||||
// macOS 端对工作空间放置在 iCloud 路径下做检查 https://github.com/siyuan-note/siyuan/issues/7747
|
||||
iCloudRoot := filepath.Join(HomeDir, "Library", "Mobile Documents")
|
||||
WalkWithSymlinks(iCloudRoot, func(path string, info os.FileInfo, err error) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue