(ctx context.DnoteCtx)
| 35 | } |
| 36 | |
| 37 | func 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 |
| 52 | func GetPath(ctx context.DnoteCtx) string { |
no test coverage detected