~ianmjones/snippetpixie

4190561e6c1f7290de2c0a8147e38b591fa32fae — Ian M. Jones 18 days ago 002987c
Fix daemon not using correct default database name
1 files changed, 3 insertions(+), 1 deletions(-)

M cmd/snippetpixied/main.go
M cmd/snippetpixied/main.go => cmd/snippetpixied/main.go +3 -1
@@ 62,7 62,9 @@ func (c *config) init(args []string, out io.Writer) error {
	flags := flag.NewFlagSet(args[0], flag.ExitOnError)
	flags.SetOutput(out)

	defaultDBPath := args[0] + "/" + args[0] + ".db"
	binName := filepath.Base(args[0])

	defaultDBPath := binName + "/" + binName + ".db"
	dbPathUsage := "database path relative to " + xdg.DataHome

	flags.StringVarP(&c.dbPath, "database", "d", defaultDBPath, dbPathUsage)