aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/plugins/simple/DirectorySave.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-26 08:39:44 +0100
committerMax Kellermann <max@duempel.org>2014-02-27 20:49:13 +0100
commite9a85aa4e4d0634548b5c97461beb27ae5559338 (patch)
tree7cdfdd0ae0d990a8adbecc34f32d073627483205 /src/db/plugins/simple/DirectorySave.cxx
parent2a16fc74fd354484a70efcc5b6dbfcdd73ee5f5a (diff)
downloadmpd-e9a85aa4e4d0634548b5c97461beb27ae5559338.tar.gz
mpd-e9a85aa4e4d0634548b5c97461beb27ae5559338.tar.xz
mpd-e9a85aa4e4d0634548b5c97461beb27ae5559338.zip
db/simple: mount points
A SimpleDatabase instance can now "mount" other Database instances at certain locations. This is used to use a new SimpleDatabase instance for each storage mount (issued with the "mount" protocol command). Each such instance has its own database file, stored in the directory that is specified with the "cache_directory" option.
Diffstat (limited to 'src/db/plugins/simple/DirectorySave.cxx')
-rw-r--r--src/db/plugins/simple/DirectorySave.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/db/plugins/simple/DirectorySave.cxx b/src/db/plugins/simple/DirectorySave.cxx
index 6cc5df6cb..b5989dd06 100644
--- a/src/db/plugins/simple/DirectorySave.cxx
+++ b/src/db/plugins/simple/DirectorySave.cxx
@@ -88,7 +88,8 @@ directory_save(FILE *fp, const Directory &directory)
directory_for_each_child(cur, directory) {
fprintf(fp, DIRECTORY_DIR "%s\n", cur->GetName());
- directory_save(fp, *cur);
+ if (!cur->IsMount())
+ directory_save(fp, *cur);
if (ferror(fp))
return;