{"record":{"id":"a7d8a0049e1642fe","repo":"siyuan-note/siyuan","slug":"vault-paths-differ-only-by-letter-case-s-and","errorCode":null,"errorMessage":"Vault paths differ only by letter case [%s] and [%s]","messagePattern":"Vault paths differ only by letter case \\[(.+?)\\] and \\[(.+?)\\]","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/import_obsidian.go","lineNumber":655,"sourceCode":"\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t\tif err = scanObsidianVaultFiles(ctx, vault, rel, abs); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif !isObsidianImportableFileMode(entryInfo.Mode()) {\n\t\t\tvault.Analysis.SkippedSpecialCount++\n\t\t\tcontinue\n\t\t}\n\n\t\text := strings.ToLower(filepath.Ext(name))\n\t\tisMD := ext == \".md\"\n\t\tfile := &obsidianSourceFile{RelPath: rel, AbsPath: abs, Size: entryInfo.Size(), ModTime: entryInfo.ModTime(), IsMD: isMD}\n\t\tkey := obsidianPathKey(rel)\n\t\tif existing := vault.Files[key]; existing != nil && existing.RelPath != rel {\n\t\t\treturn fmt.Errorf(\"Vault paths differ only by letter case [%s] and [%s]\", existing.RelPath, rel)\n\t\t}\n\t\tvault.Files[key] = file\n\t\tif !isMD {\n\t\t\tfinalName := util.AssetName(util.FilterUploadFileName(filepath.Base(rel)), ast.NewNodeID())\n\t\t\tvault.Assets[key] = &obsidianAssetPlan{Source: file, FinalName: finalName}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc isObsidianImportableFileMode(mode fs.FileMode) bool {\n\treturn mode.IsRegular()\n}\n\nfunc isObsidianResolvedLink(p string) bool {\n\tresolved, err := filepath.EvalSymlinks(p)\n\treturn err == nil && !sameObsidianPath(filepath.Clean(p), filepath.Clean(resolved))\n}","sourceCodeStart":637,"sourceCodeEnd":673,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/model/import_obsidian.go#L637-L673","documentation":"Two paths in the Vault differ only by letter case (e.g. `Notes/readme.md` and `Notes/README.md`), which maps to the same case-insensitive key in the internal file index. Since SiYuan storage is case-sensitive and such vaults are ambiguous (common on case-insensitive filesystems), the import aborts instead of guessing which file wins.","triggerScenarios":"scanObsidianVaultFiles registers a file under key obsidianPathKey(rel) and finds an existing entry with a different but case-only-different RelPath — only possible when the underlying filesystem treats paths case-insensitively while storing mixed-case names.","commonSituations":"macOS/Windows vaults containing files like `TODO.md` and `todo.md` in the same folder (created via different tools, cloud sync, or git with case-only renames); sync clients that resurrect both spellings.","solutions":["In the vault, rename one of the two reported files so their paths differ beyond letter case","Search the vault for case-duplicates (git users: `git config core.ignoreCase false` and list variants)","If the duplicate came from a sync tool, reconcile it there before re-importing","On case-sensitive systems hosting a vault copied from Windows/macOS, deduplicate before import"],"exampleFix":"// vault content before\nNotes/readme.md\nNotes/README.md\n// after renaming one\nNotes/readme.md\nNotes/about.md","handlingStrategy":"validation","validationCode":"const seen = new Map();\nfor (const f of vaultFiles) {\n  const key = f.path.toLowerCase();\n  if (seen.has(key) && seen.get(key) !== f.path) {\n    throw new Error(`Case-only duplicate: ${seen.get(key)} vs ${f.path}`);\n  }\n  seen.set(key, f.path);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Deduplicate case-only filename variants before importing a vault from macOS/Windows","Use `git ls-files | sort -f | uniq -di` style checks to find case conflicts","Configure sync tools to preserve/reconcile case-only renames"],"tags":["obsidian-import","case-sensitivity","duplicate-paths","filesystem"],"backgroundTag":"file-already-exists","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"}