Commit d4fccb00 authored by owsla's avatar owsla

Print a more helpful error message if we cannot read the backup destination.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@973 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 6ed89661
......@@ -704,8 +704,13 @@ def require_root_set(rp, read_only):
if not restore_set_root(rp):
Log.FatalError(("Bad directory %s.\n" % (rp.path,)) +
"It doesn't appear to be an rdiff-backup destination dir")
Globals.rbdir.conn.fs_abilities.single_set_globals(Globals.rbdir,
read_only)
try:
Globals.rbdir.conn.fs_abilities.single_set_globals(Globals.rbdir,
read_only)
except IOError, exc:
print("\n")
Log.FatalError("Could not open rdiff-backup directory\n\n%s\n\n"
"due to\n\n%s" % (Globals.rbdir.path, exc))
if Globals.chars_to_quote: return restore_init_quoting(rp)
else: return rp
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment