db/update/Archive: delete archive from database on error

This commit is contained in:
Max Kellermann 2014-01-31 22:24:28 +01:00
parent 26970579b8
commit 78689645dc
1 changed files with 2 additions and 0 deletions

View File

@ -123,6 +123,8 @@ UpdateWalk::UpdateArchiveFile(Directory &parent, const char *name,
ArchiveFile *file = archive_file_open(&plugin, path_fs.c_str(), error); ArchiveFile *file = archive_file_open(&plugin, path_fs.c_str(), error);
if (file == nullptr) { if (file == nullptr) {
LogError(error); LogError(error);
if (directory != nullptr)
editor.LockDeleteDirectory(directory);
return; return;
} }