From b0e0012c22f5ffac4da91cef05743916e9b43ac7 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 29 Sep 2021 15:36:14 +0200 Subject: Fix `/plugins update ~/dir` If `~/dir` exists profanity exits for me. Whole code for updating plugins from a dir isn't even implemented. Even though some messgages suggest otherwise. Remove this and only allow updating of one file. --- src/command/cmd_funcs.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/command/cmd_funcs.c') diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index ab48c3fb..8325ab44 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -7014,7 +7014,7 @@ cmd_plugins_update(ProfWin* window, const char* const command, gchar** args) char* path; if (args[1] == NULL) { - cons_show("Please provide a path to the plugin file or directory, see /help plugins"); + cons_show("Please provide a path to the plugin file, see /help plugins"); return TRUE; } else { path = get_expanded_path(args[1]); @@ -7054,13 +7054,8 @@ cmd_plugins_update(ProfWin* window, const char* const command, gchar** args) return TRUE; } - if (is_dir(path)) { - free(path); - return FALSE; - } - free(path); - cons_show("Argument must be a file or directory."); + cons_show("Argument must be a file."); return TRUE; } -- cgit 1.4.1-2-gfad0