From 4c3323b5455526a83ad5c2b2e7cd737c1bedf9e7 Mon Sep 17 00:00:00 2001 From: James Harper Date: Fri, 20 Mar 2009 00:23:32 +0000 Subject: [PATCH] Detect the case where logfiles but no databases are being restored. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8555 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/win32/filed/plugins/storage_group_node.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bacula/src/win32/filed/plugins/storage_group_node.c b/bacula/src/win32/filed/plugins/storage_group_node.c index b9f111a80e..f87a446851 100644 --- a/bacula/src/win32/filed/plugins/storage_group_node.c +++ b/bacula/src/win32/filed/plugins/storage_group_node.c @@ -354,6 +354,12 @@ storage_group_node_t::createFile(exchange_fd_context_t *context, struct restore_ switch (state) { case 0: + if (context->path_bits[level + 2] == NULL) + { + _JobMessage(M_ERROR, "Unexpected log file '%s%s' - expecting database\n", full_path, context->path_bits[level + 1]); + state = 999; + break; + } service_name = new WCHAR[strlen(parent->name) + 1]; storage_group_name = new WCHAR[strlen(name) + 1]; mbstowcs(service_name, parent->name, strlen(parent->name) + 1); -- 2.39.5