{"record":{"id":"5e4a273daa0ad6a5","repo":"ipfs/kubo","slug":"finding-config-filepath-from-repo-s-and-user-conf","errorCode":null,"errorMessage":"finding config filepath from repo %s and user config %s: %w","messagePattern":"finding config filepath from repo (.+?) and user config (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"repo/fsrepo/fsrepo.go","lineNumber":234,"sourceCode":"\t\tr.filemgr = filestore.NewFileManager(r.ds, filepath.Dir(r.path))\n\t\tr.filemgr.AllowFiles = r.config.Experimental.FilestoreEnabled\n\t\tr.filemgr.AllowUrls = r.config.Experimental.UrlstoreEnabled\n\t}\n\n\tkeepLocked = true\n\treturn r, nil\n}\n\nfunc newFSRepo(rpath string, userConfigFilePath string) (*FSRepo, error) {\n\texpPath, err := fsutil.ExpandHome(filepath.Clean(rpath))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tconfigFilePath, err := config.Filename(rpath, userConfigFilePath)\n\tif err != nil {\n\t\t// FIXME: Personalize this when the user config path is \"\".\n\t\treturn nil, fmt.Errorf(\"finding config filepath from repo %s and user config %s: %w\",\n\t\t\trpath, userConfigFilePath, err)\n\t}\n\treturn &FSRepo{path: expPath, configFilePath: configFilePath}, nil\n}\n\nfunc checkInitialized(path string) error {\n\tif !isInitializedUnsynced(path) {\n\t\talt := strings.Replace(path, \".ipfs\", \".go-ipfs\", 1)\n\t\tif isInitializedUnsynced(alt) {\n\t\t\treturn ErrOldRepo\n\t\t}\n\t\treturn NoRepoError{Path: path}\n\t}\n\treturn nil\n}\n\n// configIsInitialized returns true if the repo is initialized at\n// provided |path|.","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/repo/fsrepo/fsrepo.go#L216-L252","documentation":"While opening the repo, resolving the config file path from the repo path plus the user config override failed (config.Filename errored); typically an invalid IPFS_DIR / user config path or expansion problem.","triggerScenarios":"Thrown at repo/fsrepo/fsrepo.go:234 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check IPFS_PATH and any config-path override for typos or bad '~' expansion","Verify the directories exist and are readable","Unset the override if you want the default $IPFS_PATH/config"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}