siyuan-note/siyuan · critical

workspace dir [ ] is in third party sync dir

Error message

workspace dir [%s] is in third party sync dir

What it means

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.

Solutions

  1. Move the workspace out of any cloud-sync-managed directory to a plain local path
  2. Start SiYuan with a workspace path outside synced folders (e.g. ~/SiYuan)
  3. If cloud backup is desired, use SiYuan's built-in sync/backup instead of third-party folder sync
  4. Update launch scripts/shortcuts that still point at the old synced path

Example fix

// before
siyuan --workspace ~/Dropbox/SiYuanWorkspace // fatal: in third party sync dir
// after
siyuan --workspace ~/SiYuanWorkspace         // local, unsynced path
Defensive patterns

Strategy: validation

Validate before calling

func isInsideSyncDir(ws string) bool {
  for _, marker := range []string{"Dropbox", "OneDrive", "Google Drive", "iCloud"} {
    if strings.Contains(strings.ToLower(filepath.ToSlash(ws)), strings.ToLower(marker)) {
      return true
    }
  }
  return false
}
// reject workspace paths before launching the kernel

Prevention

When it happens

Trigger: Launching SiYuan with --workspace pointing into a directory managed by a cloud-sync client, i.e. IsCloudDrivePath(WorkspaceDir) returns true.

Common situations: 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.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19). Data as JSON: /api/errors/542f2635c97409be. Report an issue: GitHub.

Appendix: source

Thrown at kernel/util/runtime.go:347

	for {
		<-thirdPartySyncCheckTicker.C
		checkFileSysStatus()
	}
}

func checkFileSysStatus() {
	defer logging.Recover()

	if !checkFileSysStatusLock.TryLock() {
		logging.LogWarnf("check file system status is locked, skip")
		return
	}
	defer checkFileSysStatusLock.Unlock()

	const fileSysStatusCheckFile = ".siyuan/filesys_status_check"
	if IsCloudDrivePath(WorkspaceDir) {
		ReportFileSysFatalError(fmt.Errorf("workspace dir [%s] is in third party sync dir", WorkspaceDir))
		return
	}

	dir := filepath.Join(DataDir, fileSysStatusCheckFile)
	if err := os.RemoveAll(dir); err != nil {
		ReportFileSysFatalError(err)
		return
	}

	if err := os.MkdirAll(dir, 0755); err != nil {
		ReportFileSysFatalError(err)
		return
	}

	for range 7 {
		tmp := filepath.Join(dir, "check_consistency")
		data := make([]byte, 1024*4)
		_, err := rand.Read(data)

View on GitHub (pinned to 9f775e8a12)