summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-31 22:24:28 +0100
committerMax Kellermann <max@duempel.org>2014-01-31 22:24:28 +0100
commit78689645dcedbe0f7da89d1108193141f0e9eeb6 (patch)
tree79f5758ef1404391970217e33bad73e0fa892914
parent26970579b86c4dfb8e7a11cbc12edac670e4f0e2 (diff)
db/update/Archive: delete archive from database on error
-rw-r--r--src/db/update/Archive.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/db/update/Archive.cxx b/src/db/update/Archive.cxx
index 6d47ae0d1..0d7127685 100644
--- a/src/db/update/Archive.cxx
+++ b/src/db/update/Archive.cxx
@@ -123,6 +123,8 @@ UpdateWalk::UpdateArchiveFile(Directory &parent, const char *name,
ArchiveFile *file = archive_file_open(&plugin, path_fs.c_str(), error);
if (file == nullptr) {
LogError(error);
+ if (directory != nullptr)
+ editor.LockDeleteDirectory(directory);
return;
}