1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

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.
This commit is contained in:
Michael Vetter 2021-09-29 15:36:14 +02:00
parent 18c02e5c4d
commit b0e0012c22

View File

@ -7014,7 +7014,7 @@ cmd_plugins_update(ProfWin* window, const char* const command, gchar** args)
char* path; char* path;
if (args[1] == NULL) { 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; return TRUE;
} else { } else {
path = get_expanded_path(args[1]); path = get_expanded_path(args[1]);
@ -7054,13 +7054,8 @@ cmd_plugins_update(ProfWin* window, const char* const command, gchar** args)
return TRUE; return TRUE;
} }
if (is_dir(path)) {
free(path);
return FALSE;
}
free(path); free(path);
cons_show("Argument must be a file or directory."); cons_show("Argument must be a file.");
return TRUE; return TRUE;
} }