/*
Bacula® - The Network Backup Solution
- Copyright (C) 2002-2011 Free Software Foundation Europe e.V.
+ Copyright (C) 2002-2012 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
#include "bacula.h"
#include "findlib/find.h"
-#define PAGE_SIZE 4096
+#define B_PAGE_SIZE 4096
#define MAX_PAGES 2400
-#define MAX_BUF_SIZE (MAX_PAGES * PAGE_SIZE) /* approx 10MB */
+#define MAX_BUF_SIZE (MAX_PAGES * B_PAGE_SIZE) /* approx 10MB */
/* Forward referenced subroutines */
static TREE_NODE *search_and_insert_tree_node(char *fname, int type,
}
Dmsg3(100, "Total size=%u blocks=%u freed_blocks=%u\n", root->total_size, root->blocks, freed_blocks);
free(root);
+ garbage_collect_memory();
return;
}
char *p;
int len;
TREE_NODE *cd;
+ char save_char;
+ int match;
if (*path == 0) {
return node;
&& strncmp(cd->fname, path, len) == 0) {
break;
}
+ /* fnmatch has no len in call so we truncate the string */
+ save_char = path[len];
+ path[len] = 0;
+ match = fnmatch(path, cd->fname, 0) == 0;
+ path[len] = save_char;
+ if (match) {
+ break;
+ }
}
if (!cd || (cd->type == TN_FILE && !tree_node_has_child(cd))) {
return NULL;