aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2006-01-05 01:46:00 +0000
committerMichael Olson <mwolson@gnu.org>2006-01-05 01:46:00 +0000
commit417ef863ffd9868d086ad1f3046769e7c0dce821 (patch)
treeae61a5c5f661a00423d708c32b5af2877ae05a1c
parentd55a9c702e617e9808213c07847d5a0b803df1c2 (diff)
emms-player-mpd: Quote file argument so that filenames with spaces are treated correctly.
darcs-hash:20060105014642-1bfb2-d3de3b0693aa45aa354888143fe038124f3f08d5.gz
-rw-r--r--emms-player-mpd.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/emms-player-mpd.el b/emms-player-mpd.el
index cc91c6b..69a8bfb 100644
--- a/emms-player-mpd.el
+++ b/emms-player-mpd.el
@@ -364,7 +364,8 @@ This usually means removing a prefix."
If we succeed in adding the file, return non-nil, nil otherwise."
(setq file (emms-player-mpd-get-filename file))
(let ((output (emms-player-mpd-parse-response
- (emms-player-mpd-send-and-wait (concat "add " file)))))
+ (emms-player-mpd-send-and-wait
+ (concat "add \"" file "\"")))))
(if (car output)
(progn
(when emms-player-mpd-verbose
@@ -496,7 +497,7 @@ info from MusicPD."
(setq info (emms-player-mpd-get-alist
(emms-player-mpd-parse-response
(emms-player-mpd-send-and-wait
- (concat "find filename " file)))))))
+ (concat "find filename \"" file "\"")))))))
(when info
(dolist (data info)
(let ((name (car data))