[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Erc-commit] [commit][master] erc-dcc: Make file names with spaces in th
From: |
mwolson |
Subject: |
[Erc-commit] [commit][master] erc-dcc: Make file names with spaces in them work, in a very lazy way. |
Date: |
Wed, 30 Jan 2008 20:10:09 -0500 |
commit e0b2b8deef3daab539a55a9f3abd1e3bc43e8c5e
Author: Michael W. Olson <address@hidden>
Date: Wed Jan 30 20:05:01 2008 -0500
erc-dcc: Make file names with spaces in them work, in a very lazy way.
diff --git a/ChangeLog b/ChangeLog
index b5b4a34..74210b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-01-31 Michael Olson <address@hidden>
+
+ * erc-dcc.el (erc-dcc-do-GET-command, erc-dcc-do-SEND-command):
+ Improve docstring. If FILE argument is split into multiple
+ arguments, re-join them into a single string, separated by a
+ space. This fixes an issue where the user wants to send or
+ receive a file with spaces in its name. It is assumed that no one
+ will try sending or receiving a file with multiple consecutive
+ spaces in its name, otherwise this fix will fail.
+
2008-01-28 Diane Murray <address@hidden>
* erc-list-old.el (list-old): Define module as list-old, not list.
diff --git a/erc-dcc.el b/erc-dcc.el
index 2aca064..a31f87b 100644
--- a/erc-dcc.el
+++ b/erc-dcc.el
@@ -474,7 +474,12 @@ type and nick are optional."
?n (erc-extract-nick (plist-get ret :nick))))))
t))
-(defun erc-dcc-do-GET-command (proc nick &optional file)
+(defun erc-dcc-do-GET-command (proc nick &rest file)
+ "Do a DCC GET command. NICK is the person who is sending the file.
+FILE is the filename. If FILE is split into multiple arguments,
+re-join the arguments, separated by a space.
+PROC is the server process."
+ (setq file (and file (mapconcat #'identity file " ")))
(let* ((elt (erc-dcc-member :nick nick :type 'GET))
(filename (or file (plist-get elt :file) "unknown")))
(if elt
@@ -547,8 +552,11 @@ It lists the current state of `erc-dcc-list' in an easy to
read manner."
'dcc-list-end)
t))
-(defun erc-dcc-do-SEND-command (proc nick file)
- "Offer FILE to NICK by sending a ctcp dcc send message."
+(defun erc-dcc-do-SEND-command (proc nick &rest file)
+ "Offer FILE to NICK by sending a ctcp dcc send message.
+If FILE is split into multiple arguments, re-join the arguments,
+separated by a space."
+ (setq file (and file (mapconcat #'identity file " ")))
(if (file-exists-p file)
(progn
(erc-display-message
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Erc-commit] [commit][master] erc-dcc: Make file names with spaces in them work, in a very lazy way.,
mwolson <=