about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/command/cmd_funcs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index a4b53bf1..d5f63846 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -6059,13 +6059,14 @@ cmd_plugins(ProfWin *window, const char *const command, gchar **args)
             return TRUE;
         }
 
-        char *plugin_name = basename(filename);
+        gchar *plugin_name = g_path_get_basename(filename);
         gboolean result = plugins_install(plugin_name, filename);
         if (result) {
             cons_show("Plugin installed: %s", plugin_name);
         } else {
             cons_show("Failed to install plugin: %s", plugin_name);
         }
+        g_free(plugin_name);
 
         return TRUE;
     } else if (g_strcmp0(args[0], "load") == 0) {