{"record":{"id":"2ab8d5557d952793","repo":"siyuan-note/siyuan","slug":"read-vault-path-s-w","errorCode":null,"errorMessage":"read Vault path [%s]: %w","messagePattern":"read Vault path \\[(.+?)\\]: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/import_obsidian.go","lineNumber":623,"sourceCode":"\tsort.Slice(entries, func(i, j int) bool { return strings.ToLower(entries[i].Name()) < strings.ToLower(entries[j].Name()) })\n\tfor _, entry := range entries {\n\t\tif err = ctx.Err(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tname := entry.Name()\n\t\trel := path.Join(relDir, filepath.ToSlash(name))\n\t\tabs := filepath.Join(absDir, name)\n\t\tif strings.HasPrefix(name, \".\") {\n\t\t\tif relDir == \"\" && name == \".obsidian\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tvault.Analysis.SkippedHiddenCount++\n\t\t\tcontinue\n\t\t}\n\t\tentryInfo, infoErr := entry.Info()\n\t\tif infoErr != nil {\n\t\t\tif entry.IsDir() || strings.EqualFold(filepath.Ext(name), \".md\") {\n\t\t\t\treturn fmt.Errorf(\"read Vault path [%s]: %w\", rel, infoErr)\n\t\t\t}\n\t\t\tvault.Analysis.Warnings = append(vault.Analysis.Warnings, rel)\n\t\t\tcontinue\n\t\t}\n\t\tif entry.Type()&os.ModeSymlink != 0 || entryInfo.Mode()&os.ModeSymlink != 0 || isObsidianResolvedLink(abs) {\n\t\t\tvault.Analysis.SkippedLinkCount++\n\t\t\tcontinue\n\t\t}\n\t\tif entryInfo.IsDir() {\n\t\t\tnestedConfig := filepath.Join(abs, \".obsidian\")\n\t\t\tif nestedInfo, nestedErr := os.Lstat(nestedConfig); nestedErr == nil {\n\t\t\t\tif nestedInfo.IsDir() || nestedInfo.Mode()&os.ModeSymlink != 0 || isObsidianResolvedLink(nestedConfig) {\n\t\t\t\t\tvault.Analysis.SkippedNestedVaultCount++\n\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","sourceCodeStart":605,"sourceCodeEnd":641,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/model/import_obsidian.go#L605-L641","documentation":"While scanning Vault entries, entry.Info() failed for a directory or a `.md` file — the two kinds whose metadata is mandatory — so the import aborts with the vault-relative path and the wrapped OS error. For other file types the failure is downgraded to a warning so unimportant unreadable files don't block the import.","triggerScenarios":"scanObsidianVaultFiles calls entry.Info() on an entry whose name is a directory or ends in `.md` (case-insensitive) and the OS call errors (e.g. the file vanished between ReadDir and Info, EACCES, broken reparse point).","commonSituations":"Files deleted or renamed by sync/another process while the import runs; permission-restricted folders inside the vault; cloud-placeholder files whose metadata cannot be hydrated.","solutions":["Retry the import with no other process (sync client, editor, antivirus) touching the vault","Fix permissions on the reported directory/Markdown file","Remove or repair the unreadable entry reported in the message","If the failing item is not a real note or folder, rename it to a non-`.md` extension so it is skipped with a warning instead of aborting"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await importObsidianVault(vaultPath);\n} catch (e) {\n  if (/read Vault path/.test(e.message) && /vanished|no such file/i.test(e.message)) {\n    await retryImport(vaultPath); // transient mid-scan deletion\n  }\n}","preventionTips":["Quiesce editors and sync clients before importing","Ensure all `.md` files and directories in the vault are readable by the SiYuan process","Retry the import once when the error indicates a file disappeared mid-scan"],"tags":["obsidian-import","filesystem","stat","race"],"backgroundTag":"file-read-failed","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"}