MCPcopy Index your code
hub / github.com/dnote/dnote / checkLegacyPath

Function checkLegacyPath

pkg/cli/config/config.go:37–49  ·  view source on GitHub ↗
(ctx context.DnoteCtx)

Source from the content-addressed store, hash-verified

35}
36
37func checkLegacyPath(ctx context.DnoteCtx) (string, bool) {
38 legacyPath := fmt.Sprintf("%s/%s", ctx.Paths.LegacyDnote, consts.ConfigFilename)
39
40 ok, err := utils.FileExists(legacyPath)
41 if err != nil {
42 log.Error(errors.Wrapf(err, "checking legacy dnote directory at %s", legacyPath).Error())
43 }
44 if ok {
45 return legacyPath, true
46 }
47
48 return "", false
49}
50
51// GetPath returns the path to the dnote config file
52func GetPath(ctx context.DnoteCtx) string {

Callers 1

GetPathFunction · 0.85

Calls 3

FileExistsFunction · 0.92
ErrorFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected