()
| 47 | type RunEFunc func(*cobra.Command, []string) error |
| 48 | |
| 49 | func checkLegacyDBPath() (string, bool) { |
| 50 | legacyDnoteDir := getLegacyDnotePath(dirs.Home) |
| 51 | ok, err := utils.FileExists(legacyDnoteDir) |
| 52 | if ok { |
| 53 | return legacyDnoteDir, true |
| 54 | } |
| 55 | |
| 56 | if err != nil { |
| 57 | log.Error(errors.Wrapf(err, "checking legacy dnote directory at %s", legacyDnoteDir).Error()) |
| 58 | } |
| 59 | |
| 60 | return "", false |
| 61 | } |
| 62 | |
| 63 | func getDBPath(paths context.Paths, customPath string) string { |
| 64 | // If custom path is provided, use it |
no test coverage detected