From e2a9cd0881593c3b3a24863ceb535367c5570888 Mon Sep 17 00:00:00 2001 From: Bence Ferdinandy Date: Fri, 21 Jun 2024 21:55:33 +0200 Subject: query: allow forcing overwrite of existing folder Currently, when using :query the user is forced to create a new folder for every query, since aerc doesn't allow overwriting an existing folder. Actually, "overwriting" an existing folder with a query is a non-destructive operation in the sense, that the underlying maildir is not touched, the only thing lost is the state in aerc. The current behaviour doesn't allow for a simple `:query -n query ` type of binding. Allow overwriting an existing folder with the -f flag. Changelog-added: Allow using existing directory name with `:query -f`. Signed-off-by: Bence Ferdinandy Acked-by: Robin Jarry --- commands/account/mkdir.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'commands/account/mkdir.go') diff --git a/commands/account/mkdir.go b/commands/account/mkdir.go index dae407cd..5ce7bbf4 100644 --- a/commands/account/mkdir.go +++ b/commands/account/mkdir.go @@ -53,7 +53,7 @@ func (m MakeDir) Execute(args []string) error { case *types.Done: app.PushStatus("Directory created.", 10*time.Second) history[acct.Name()] = previous - acct.Directories().Open(m.Folder, "", 0, nil) + acct.Directories().Open(m.Folder, "", 0, nil, false) case *types.Error: app.PushError(msg.Error.Error()) } -- cgit