#include "metadata.h"
#include "remote.h"
#include "store.h"
-#include "sha1.h"
#include "subfile.h"
#include "util.h"
+#include "third_party/sha1.h"
using std::list;
using std::map;
* one block (1 MB) worth of data. If the file doesn't seems like it might
* be larger than that, don't parse the rules in it. */
ssize_t bytes = file_read(fd, block_buf, LBS_BLOCK_SIZE);
+ close(fd);
if (bytes < 0 || bytes >= static_cast<ssize_t>(LBS_BLOCK_SIZE - 1)) {
/* TODO: Add more strict resource limits on merge files? */
fprintf(stderr,
DIR *dir = opendir(path.c_str());
if (dir == NULL) {
- fprintf(stderr, "Error: %m\n");
+ fprintf(stderr, "Error reading directory %s: %m\n",
+ path.c_str());
return;
}
" --dest=PATH path where backup is to be written\n"
" --upload-script=COMMAND\n"
" program to invoke for each backup file generated\n"
- " --exclude=PATH exclude files in PATH from snapshot\n"
- " --exclude-name=NAME exclude files called NAME from snapshot\n"
+ " --exclude=PATTERN exclude files matching PATTERN from snapshot\n"
+ " --include=PATTERN include files matching PATTERN in snapshot\n"
+ " --dir-merge=PATTERN parse files matching PATTERN to read additional\n"
+ " subtree-specific include/exclude rules during backup\n"
" --localdb=PATH local backup metadata is stored in PATH\n"
" --tmpdir=PATH path for temporarily storing backup files\n"
" (defaults to TMPDIR environment variable or /tmp)\n"