Commit 8805b483 authored by owsla's avatar owsla

Print a more helpful error message if we cannot write to the backup

destination.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@971 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent d659ea24
New in v1.2.3 (????/??/??) New in v1.2.3 (????/??/??)
--------------------------- ---------------------------
Print a more helpful error message if we cannot write to the backup
destination. (Andrew Ferguson)
Add ETIMEDOUT to the list of recoverable errors; when irrecoverable, a Add ETIMEDOUT to the list of recoverable errors; when irrecoverable, a
ConnectionError is raised. Closes Ubuntu bug #304659. (Andrew Ferguson) ConnectionError is raised. Closes Ubuntu bug #304659. (Andrew Ferguson)
......
...@@ -441,7 +441,21 @@ option.""" % rpout.path) ...@@ -441,7 +441,21 @@ option.""" % rpout.path)
elif check_failed_initial_backup(): elif check_failed_initial_backup():
fix_failed_initial_backup() fix_failed_initial_backup()
if not Globals.rbdir.lstat(): Globals.rbdir.mkdir() if not Globals.rbdir.lstat():
try:
Globals.rbdir.mkdir()
except IOError, exc:
Log.FatalError(
"""Could not create rdiff-backup directory
%s
due to
%s
Please check that the rdiff-backup user can create files and directories in the
destination directory: %s""" % (Globals.rbdir.path, exc, rpout.path))
SetConnections.UpdateGlobal('rbdir', Globals.rbdir) SetConnections.UpdateGlobal('rbdir', Globals.rbdir)
def backup_warn_if_infinite_regress(rpin, rpout): def backup_warn_if_infinite_regress(rpin, rpout):
......
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