summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.adoc1
-rw-r--r--src/plugins/plugin-script.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index a4d5081b2..a559a2eb0 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -39,6 +39,7 @@ Bug fixes::
* api: fix function string_match with joker in the string if multiple words matched in input string
* irc: escape/unescape IRC message tags values (issue #1654)
* irc: set notify level to "private" for received WALLOPS
+ * script: fix move of installed script on another filesystem (issue #1667)
Documentation::
diff --git a/src/plugins/plugin-script.c b/src/plugins/plugin-script.c
index 3feb4b44b..5ab687330 100644
--- a/src/plugins/plugin-script.c
+++ b/src/plugins/plugin-script.c
@@ -1287,8 +1287,11 @@ plugin_script_action_install (struct t_weechat_plugin *weechat_plugin,
{
snprintf (new_path, length, "%s/%s/%s",
weechat_data_dir, weechat_plugin->name, base_name);
- if (rename (name, new_path) == 0)
+ if (weechat_file_copy (name, new_path))
{
+ /* remove old file */
+ (void) remove (name);
+
/* make link in autoload dir */
if (autoload)
{