diff --git a/NEWS b/NEWS index 0b824cdd1..7ae86d430 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.20.14 (not yet released) +* database + - simple: fix file corruption in the presence of mount points ver 0.20.13 (2017/12/18) * output diff --git a/src/db/plugins/simple/DirectorySave.cxx b/src/db/plugins/simple/DirectorySave.cxx index e1f83bf5b..033d90f4a 100644 --- a/src/db/plugins/simple/DirectorySave.cxx +++ b/src/db/plugins/simple/DirectorySave.cxx @@ -82,10 +82,11 @@ directory_save(BufferedOutputStream &os, const Directory &directory) } for (const auto &child : directory.children) { - os.Format(DIRECTORY_DIR "%s\n", child.GetName()); + if (child.IsMount()) + continue; - if (!child.IsMount()) - directory_save(os, child); + os.Format(DIRECTORY_DIR "%s\n", child.GetName()); + directory_save(os, child); } for (const auto &song : directory.songs)