about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-09-29 15:36:14 +0200
committerMichael Vetter <jubalh@iodoru.org>2021-09-29 17:32:54 +0200
commitb0e0012c22f5ffac4da91cef05743916e9b43ac7 (patch)
tree900b0ecef0f37c4e8390e510ab1ba98729e931ff /src/command
parent18c02e5c4d626ef0d7966ac7467db3552ff0b975 (diff)
downloadprofani-tty-b0e0012c22f5ffac4da91cef05743916e9b43ac7.tar.gz
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.
Diffstat (limited to 'src/command')
-rw-r--r--src/command/cmd_funcs.c9
1 files changed, 2 insertions, 7 deletions
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;
 }