aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/FileCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-30 20:29:48 +0100
committerMax Kellermann <max@duempel.org>2014-01-30 20:39:40 +0100
commit4465e2c46bbed438377dc4a99df333bd5c058d5e (patch)
treecbc1d27aad939689f44b0ac3542a6ca1777b9dc1 /src/command/FileCommands.cxx
parent34b309b99aa2f274308f19974c428e1c7ac5d66f (diff)
downloadmpd-4465e2c46bbed438377dc4a99df333bd5c058d5e.tar.gz
mpd-4465e2c46bbed438377dc4a99df333bd5c058d5e.tar.xz
mpd-4465e2c46bbed438377dc4a99df333bd5c058d5e.zip
db: add compile-time option to disable database
Diffstat (limited to '')
-rw-r--r--src/command/FileCommands.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/command/FileCommands.cxx b/src/command/FileCommands.cxx
index b3676fa48..345e9b85b 100644
--- a/src/command/FileCommands.cxx
+++ b/src/command/FileCommands.cxx
@@ -127,12 +127,17 @@ handle_read_comments(Client &client, gcc_unused int argc, char *argv[])
} else if (uri_has_scheme(uri)) {
return read_stream_comments(client, uri);
} else if (*uri != '/') {
+#ifdef ENABLE_DATABASE
path_fs = map_uri_fs(uri);
if (path_fs.IsNull()) {
command_error(client, ACK_ERROR_NO_EXIST,
"No such file");
return CommandResult::ERROR;
}
+#else
+ command_error(client, ACK_ERROR_NO_EXIST, "No database");
+ return CommandResult::ERROR;
+#endif
} else {
command_error(client, ACK_ERROR_NO_EXIST, "No such file");
return CommandResult::ERROR;