{"record":{"id":"542f2635c97409be","repo":"siyuan-note/siyuan","slug":"workspace-dir-s-is-in-third-party-sync-dir","errorCode":null,"errorMessage":"workspace dir [%s] is in third party sync dir","messagePattern":"workspace dir \\[(.+?)\\] is in third party sync dir","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"kernel/util/runtime.go","lineNumber":347,"sourceCode":"\n\tfor {\n\t\t<-thirdPartySyncCheckTicker.C\n\t\tcheckFileSysStatus()\n\t}\n}\n\nfunc checkFileSysStatus() {\n\tdefer logging.Recover()\n\n\tif !checkFileSysStatusLock.TryLock() {\n\t\tlogging.LogWarnf(\"check file system status is locked, skip\")\n\t\treturn\n\t}\n\tdefer checkFileSysStatusLock.Unlock()\n\n\tconst fileSysStatusCheckFile = \".siyuan/filesys_status_check\"\n\tif IsCloudDrivePath(WorkspaceDir) {\n\t\tReportFileSysFatalError(fmt.Errorf(\"workspace dir [%s] is in third party sync dir\", WorkspaceDir))\n\t\treturn\n\t}\n\n\tdir := filepath.Join(DataDir, fileSysStatusCheckFile)\n\tif err := os.RemoveAll(dir); err != nil {\n\t\tReportFileSysFatalError(err)\n\t\treturn\n\t}\n\n\tif err := os.MkdirAll(dir, 0755); err != nil {\n\t\tReportFileSysFatalError(err)\n\t\treturn\n\t}\n\n\tfor range 7 {\n\t\ttmp := filepath.Join(dir, \"check_consistency\")\n\t\tdata := make([]byte, 1024*4)\n\t\t_, err := rand.Read(data)","sourceCodeStart":329,"sourceCodeEnd":365,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/util/runtime.go#L329-L365","documentation":"checkFileSysStatus aborts with a fatal filesystem error when the workspace directory is detected inside a third-party cloud sync folder (Dropbox, OneDrive, iCloud, etc.), because external sync tools corrupt SiYuan's data files. The error is reported via ReportFileSysFatalError and halts the check.","triggerScenarios":"Launching SiYuan with --workspace pointing into a directory managed by a cloud-sync client, i.e. IsCloudDrivePath(WorkspaceDir) returns true.","commonSituations":"Placing the workspace in Dropbox/OneDrive/iCloud Drive/Google Drive folders; using a synced home subfolder; migrating a workspace into a newly synced directory after an OS change.","solutions":["Move the workspace out of any cloud-sync-managed directory to a plain local path","Start SiYuan with a workspace path outside synced folders (e.g. ~/SiYuan)","If cloud backup is desired, use SiYuan's built-in sync/backup instead of third-party folder sync","Update launch scripts/shortcuts that still point at the old synced path"],"exampleFix":"// before\nsiyuan --workspace ~/Dropbox/SiYuanWorkspace // fatal: in third party sync dir\n// after\nsiyuan --workspace ~/SiYuanWorkspace         // local, unsynced path","handlingStrategy":"validation","validationCode":"func isInsideSyncDir(ws string) bool {\n  for _, marker := range []string{\"Dropbox\", \"OneDrive\", \"Google Drive\", \"iCloud\"} {\n    if strings.Contains(strings.ToLower(filepath.ToSlash(ws)), strings.ToLower(marker)) {\n      return true\n    }\n  }\n  return false\n}\n// reject workspace paths before launching the kernel","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always place workspaces on plain local disks, outside any sync client folders","Use SiYuan's built-in sync instead of Dropbox/OneDrive folder sync","Audit launch scripts and shortcuts for hardcoded synced paths","Re-check the workspace path after OS migrations or new sync client installs"],"tags":["workspace","filesystem","sync"],"backgroundTag":"invalid-config-value","analyzedSha":"9f775e8a12daef8255556097396f9b2739078892","analyzedAt":"2026-09-19T03:17:15.984Z","contentChangedAt":"2026-09-19T03:17:15.984Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}