diff options
author | Max Kellermann <max@duempel.org> | 2014-03-01 08:16:13 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-03-01 08:16:13 +0100 |
commit | 7ccc609da2219d414dbed6c55cfdb9d52b359823 (patch) | |
tree | bd854e61f03df335cba3766f647441290a91b1f2 /src/db/update/ExcludeList.cxx | |
parent | ebc01680721b3ac8ff59f65166573c1571f14f86 (diff) | |
download | mpd-7ccc609da2219d414dbed6c55cfdb9d52b359823.tar.gz mpd-7ccc609da2219d414dbed6c55cfdb9d52b359823.tar.xz mpd-7ccc609da2219d414dbed6c55cfdb9d52b359823.zip |
db/update/ExcludeList: make no-op if GLib is disabled
Quick hack to allow using the database without GLib (for Android).
Diffstat (limited to 'src/db/update/ExcludeList.cxx')
-rw-r--r-- | src/db/update/ExcludeList.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/db/update/ExcludeList.cxx b/src/db/update/ExcludeList.cxx index 0a5fbac9f..cf92ac8f7 100644 --- a/src/db/update/ExcludeList.cxx +++ b/src/db/update/ExcludeList.cxx @@ -39,6 +39,7 @@ static constexpr Domain exclude_list_domain("exclude_list"); bool ExcludeList::LoadFile(Path path_fs) { +#ifdef HAVE_GLIB FILE *file = FOpen(path_fs, FOpenMode::ReadText); if (file == nullptr) { const int e = errno; @@ -64,6 +65,10 @@ ExcludeList::LoadFile(Path path_fs) } fclose(file); +#else + // TODO: implement + (void)path_fs; +#endif return true; } @@ -75,9 +80,14 @@ ExcludeList::Check(Path name_fs) const /* XXX include full path name in check */ +#ifdef HAVE_GLIB for (const auto &i : patterns) if (i.Check(name_fs.c_str())) return true; +#else + // TODO: implement + (void)name_fs; +#endif return false; } |