]> git.sur5r.net Git - bacula/bacula/commitdiff
Detect the case where logfiles but no databases are being restored.
authorJames Harper <james.harper@bendigoit.com.au>
Fri, 20 Mar 2009 00:23:32 +0000 (00:23 +0000)
committerJames Harper <james.harper@bendigoit.com.au>
Fri, 20 Mar 2009 00:23:32 +0000 (00:23 +0000)
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

index b9f111a80e4e2595df68999956fb9f3f6ed4ec9e..f87a446851baaae192dbacac57ff0444fea9c817 100644 (file)
@@ -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);