aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/update/Walk.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-27 16:36:11 +0100
committerMax Kellermann <max@duempel.org>2014-02-27 16:58:35 +0100
commit681e012fb542ee1bb2ea5312dc673987a7a8ee29 (patch)
tree2887e01d906c89f99516d67c555a2318473cc169 /src/db/update/Walk.cxx
parent3be36643a1bded02171d8ddaac7d7aecfdc1915a (diff)
downloadmpd-681e012fb542ee1bb2ea5312dc673987a7a8ee29.tar.gz
mpd-681e012fb542ee1bb2ea5312dc673987a7a8ee29.tar.xz
mpd-681e012fb542ee1bb2ea5312dc673987a7a8ee29.zip
db/update: cancel the update on shutdown
Diffstat (limited to 'src/db/update/Walk.cxx')
-rw-r--r--src/db/update/Walk.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db/update/Walk.cxx b/src/db/update/Walk.cxx
index c65480873..db05b1823 100644
--- a/src/db/update/Walk.cxx
+++ b/src/db/update/Walk.cxx
@@ -358,7 +358,7 @@ UpdateWalk::UpdateDirectory(Directory &directory, const FileInfo &info)
PurgeDeletedFromDirectory(directory);
const char *name_utf8;
- while ((name_utf8 = reader->Read()) != nullptr) {
+ while (!cancel && (name_utf8 = reader->Read()) != nullptr) {
if (skip_path(name_utf8))
continue;