Skip to content

Commit ec3f8b5

Browse files
committed
fixes issue #83
1 parent 8927921 commit ec3f8b5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/client.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,12 @@ impl<S: Read + Write> Client<S> {
491491
// Reflection methods {{{
492492
/// Get current music directory
493493
pub fn music_directory(&mut self) -> Result<String> {
494-
self.run_command("config", ()).and_then(|_| self.read_field("music_directory"))
494+
self.run_command("config", ()).and_then(|_| loop {
495+
let (key, value) = self.read_pair()?;
496+
if key == "music_directory" {
497+
break Ok(value)
498+
}
499+
})
495500
}
496501

497502
/// List all available commands

0 commit comments

Comments
 (0)