siyuan-note/siyuan · error

read Vault path [ ]

Error message

read Vault path [%s]: %w

What it means

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.

Solutions

  1. Retry the import with no other process (sync client, editor, antivirus) touching the vault
  2. Fix permissions on the reported directory/Markdown file
  3. Remove or repair the unreadable entry reported in the message
  4. 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
Defensive patterns

Strategy: retry

Try / catch

try {
  await importObsidianVault(vaultPath);
} catch (e) {
  if (/read Vault path/.test(e.message) && /vanished|no such file/i.test(e.message)) {
    await retryImport(vaultPath); // transient mid-scan deletion
  }
}

Prevention

When it happens

Trigger: 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).

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

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


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

Appendix: source

Thrown at kernel/model/import_obsidian.go:623

	sort.Slice(entries, func(i, j int) bool { return strings.ToLower(entries[i].Name()) < strings.ToLower(entries[j].Name()) })
	for _, entry := range entries {
		if err = ctx.Err(); err != nil {
			return err
		}
		name := entry.Name()
		rel := path.Join(relDir, filepath.ToSlash(name))
		abs := filepath.Join(absDir, name)
		if strings.HasPrefix(name, ".") {
			if relDir == "" && name == ".obsidian" {
				continue
			}
			vault.Analysis.SkippedHiddenCount++
			continue
		}
		entryInfo, infoErr := entry.Info()
		if infoErr != nil {
			if entry.IsDir() || strings.EqualFold(filepath.Ext(name), ".md") {
				return fmt.Errorf("read Vault path [%s]: %w", rel, infoErr)
			}
			vault.Analysis.Warnings = append(vault.Analysis.Warnings, rel)
			continue
		}
		if entry.Type()&os.ModeSymlink != 0 || entryInfo.Mode()&os.ModeSymlink != 0 || isObsidianResolvedLink(abs) {
			vault.Analysis.SkippedLinkCount++
			continue
		}
		if entryInfo.IsDir() {
			nestedConfig := filepath.Join(abs, ".obsidian")
			if nestedInfo, nestedErr := os.Lstat(nestedConfig); nestedErr == nil {
				if nestedInfo.IsDir() || nestedInfo.Mode()&os.ModeSymlink != 0 || isObsidianResolvedLink(nestedConfig) {
					vault.Analysis.SkippedNestedVaultCount++
					continue
				}
			}
			if err = scanObsidianVaultFiles(ctx, vault, rel, abs); err != nil {
				return err

View on GitHub (pinned to 9f775e8a12)