siyuan-note/siyuan · critical
workspace dir [%s] is in third party sync dir
Error message
workspace dir [%s] is in third party sync dir
What it means
Reported via ReportFileSysFatalError (kernel/util/runtime.go:281) when IsCloudDrivePath(WorkspaceDir) returns true during the periodic filesystem consistency check. ReportFileSysFatalError logs and calls os.Exit(logging.ExitCodeFileSysErr), so this error TERMINATES THE KERNEL. SiYuan refuses to run on top of third-party sync folders because they corrupt the .sy block tree via concurrent rename/write.
Source
Thrown at kernel/util/runtime.go:281
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 251596fc0d)
Solutions
- Move the workspace to a plain local directory outside any cloud-sync folder (e.g. ~/Documents/SiYuan).
- Use SiYuan's built-in sync (S3/WebDAV/liuyun) instead of a sync-client folder.
- If you must keep files in a sync folder for read-only backup, exclude the workspace from the sync client's watch list.
- After moving, restart the kernel — the check only re-evaluates on each tick after boot.
Example fix
// before: workspace = /Users/me/OneDrive/SiYuan // kernel exits with: workspace dir [...] is in third party sync dir // after: move workspace out of the sync folder and reconfigure // 设置 - 关于 - 工作空间 -> /Users/me/Documents/SiYuan // then restart SiYuan
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check at startup or before assigning a workspace
if util.IsCloudDrivePath(candidateWorkspace) {
return fmt.Errorf("refusing workspace %s: it is inside a cloud-sync folder", candidateWorkspace)
} Try / catch
// This error is FATAL (os.Exit) — there is no catch. The only defense is prevention: // never start the kernel with a workspace inside a sync folder.
Prevention
- Never place the workspace under OneDrive, Dropbox, Google Drive, pCloud, 坚果云, 天翼云, or iCloud.
- Use SiYuan's built-in sync (S3/WebDAV/liuyun) for cross-device data.
- If you must co-exist with a sync client, exclude the workspace directory from its watch list.
- After moving the workspace, restart the kernel so the periodic check re-evaluates.
When it happens
Trigger: The workspace directory path matches a known cloud-sync folder: OneDrive, Dropbox, Google Drive, pCloud, 坚果云 (Nutstore), 天翼云, or (on macOS) an iCloud ubiquitous location detected via system metadata. The check runs on the thirdPartySyncCheckTicker every cycle once CheckFileSysStatus starts.
Common situations: User picks ~/OneDrive/SiYuan or ~/Dropbox/SiYuan as the workspace; macOS user puts the workspace under ~/Library/Mobile Documents/com~apple~CloudDocs; first-run dialog ignored; workspace moved into a sync folder after initial setup.
Related errors
- dir [%s] has more than 1 file: %s
- marketplace package install path already exists
- install local marketplace package failed: %w; rollback faile
- remove community package [%s] failed
- --output is required for docx
AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12).
Data as JSON: /api/errors/542f2635c97409be.
Report an issue: GitHub.