Overhaul restore destination handling, and stripping/grafting behavior.
Change restore to respond to source paths like this (assume outdir
corresponds to "." if there no -C argument or to -C outdir):
/foo/what/ever - extract ever to outdir/ever
/foo/what/ever/ - extract ever/* to outdir/*
/foo/what/ever/. - extract ever/. to outdir/. (i.e. outdir == ever).
Also fix handling of top-level commit symlinks. Previously bup would
just restore /foo/latest as a dummy symlink like this:
latest -> ../.commit/SHA
Instead, dereference latest and restore the target instead.
Tighten up stripping/grafting with additional argument checks, and
handle any root collisions by creating a fake root dir (see comments
in save-cmd.py). Bup still doesn't handle other path collisions yet,
i.e. if both /foo/bar and /bar are remapped to /bar.
Signed-off-by: Rob Browning <rlb@defaultvalue.org> Reviewed-by: Zoran Zaric <zz@zoranzaric.de>