summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-04-26 20:51:17 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-04-26 20:51:17 +0200
commit9f0e7fb47ec2feb551a30b39dde114b1074acb16 (patch)
tree5fb0a7cec398f1091ad382a00495c5a446026fb7
parentbcd889cf903122e25697937b606833df240c2f34 (diff)
downloadweechat-9f0e7fb47ec2feb551a30b39dde114b1074acb16.zip
xfer: make file transfer fail when option xfer.file.auto_rename is off and file already exists (closes #1633)
-rw-r--r--ChangeLog.adoc1
-rw-r--r--src/plugins/xfer/xfer-file.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index d9e72f312..90153fde9 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -32,6 +32,7 @@ Bug fixes::
* core: prevent switching to start of visited buffers when jumping to next (issue #1591, issue #1592)
* core: recreate buflist and fset bars on /reload when WeeChat is started without configuration files (issue #1618)
* buflist: fix comparison of hotlists in option buflist.look.sort (issue #1621)
+ * xfer: make file transfer fail when option xfer.file.auto_rename is off and file already exists (issue #1633)
Tests::
diff --git a/src/plugins/xfer/xfer-file.c b/src/plugins/xfer/xfer-file.c
index f00aab3b7..0ba198eef 100644
--- a/src/plugins/xfer/xfer-file.c
+++ b/src/plugins/xfer/xfer-file.c
@@ -185,7 +185,7 @@ xfer_file_find_suffix (struct t_xfer *xfer)
return;
/* if auto rename is not set, then abort xfer */
- if (!xfer_config_file_auto_rename)
+ if (!weechat_config_boolean (xfer_config_file_auto_rename))
{
xfer_close (xfer, XFER_STATUS_FAILED);
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);