summaryrefslogtreecommitdiff
path: root/libmpd/database.rb
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2009-08-01 16:39:21 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2009-08-01 16:39:21 -0700
commit1d6507fd00dd7f4ceef6b148a13d53ac39badef7 (patch)
treeb8580ad77ba0c9a1395633601fbe96cee617435c /libmpd/database.rb
parentc1dbf9e1e4f4aeac340494def5a528a964e549c0 (diff)
downloadruby-libmpd-1d6507fd00dd7f4ceef6b148a13d53ac39badef7.tar.gz
ruby-libmpd-1d6507fd00dd7f4ceef6b148a13d53ac39badef7.tar.xz
Return full paths to files and directories.
Diffstat (limited to 'libmpd/database.rb')
-rw-r--r--libmpd/database.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmpd/database.rb b/libmpd/database.rb
index 27efa93..3c114f6 100644
--- a/libmpd/database.rb
+++ b/libmpd/database.rb
@@ -23,7 +23,7 @@ module MPDDatabase
path = String.new
end
- return send_request(command).scan(/^directory: #{path}([^\/]+?)\n/).flatten
+ return send_request(command).scan(/^directory: (#{path}[^\/]+?)\n/).flatten
end
# Counts the number of songs in the database where _field_ is _value_, as
@@ -51,7 +51,7 @@ module MPDDatabase
path = String.new
end
- return send_request(command).scan(/^file: #{path}([^\/]+?)\n/).flatten
+ return send_request(command).scan(/^file: (#{path}[^\/]+?)\n/).flatten
end
# Finds all songs in the database where _field_ contains _value_.