/[rdiff-backup]/rdiff-backup/rdiff_backup/Main.py
ViewVC logotype

Diff of /rdiff-backup/rdiff_backup/Main.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.38.2.3 by bescoto, Sun Aug 24 03:46:13 2003 UTC revision 1.38.2.4 by bescoto, Wed Aug 27 20:29:30 2003 UTC
# Line 419  def restore_set_select(mirror_rp, target Line 419  def restore_set_select(mirror_rp, target
419  def restore_start_log(rpin, target, time):  def restore_start_log(rpin, target, time):
420          """Open restore log file, log initial message"""          """Open restore log file, log initial message"""
421          try: Log.open_logfile(datadir.append("restore.log"))          try: Log.open_logfile(datadir.append("restore.log"))
422          except LoggerError, e: Log("Warning, " + str(e), 2)          except (LoggerError, Security.Violation), e:
423                    Log("Warning - Unable to open " + str(e), 2)
424    
425          # Log following message at file verbosity 3, but term verbosity 4          # Log following message at file verbosity 3, but term verbosity 4
426          log_message = ("Starting restore of %s to %s as it was as of %s." %          log_message = ("Starting restore of %s to %s as it was as of %s." %
# Line 475  def restore_get_root(rpin): Line 476  def restore_get_root(rpin):
476          global datadir          global datadir
477          if rpin.isincfile(): relpath = rpin.getincbase().path          if rpin.isincfile(): relpath = rpin.getincbase().path
478          else: relpath = rpin.path          else: relpath = rpin.path
479          pathcomps = os.path.join(rpin.conn.os.getcwd(), relpath).split("/")          if rpin.conn is not Globals.local_connection:
480          assert len(pathcomps) >= 2 # path should be relative to /                  # For security checking consistency, don't get absolute path
481                    pathcomps = relpath.split('/')
482            else: pathcomps = os.path.join(os.getcwd(), relpath).split("/")
483            if not pathcomps[0]: min_len_pathcomps = 2 # treat abs paths differently
484            else: min_len_pathcomps = 1
485    
486          i = len(pathcomps)          i = len(pathcomps)
487          while i >= 2:          while i >= min_len_pathcomps:
488                  parent_dir = rpath.RPath(rpin.conn, "/".join(pathcomps[:i]))                  parent_dir = rpath.RPath(rpin.conn, "/".join(pathcomps[:i]))
489                  if (parent_dir.isdir() and                  if (parent_dir.isdir() and
490                          "rdiff-backup-data" in parent_dir.listdir()): break                          "rdiff-backup-data" in parent_dir.listdir()): break
# Line 613  The rdiff-backup data directory Line 618  The rdiff-backup data directory
618  exists, but we cannot find a valid current_mirror marker.  You can  exists, but we cannot find a valid current_mirror marker.  You can
619  avoid this message by removing this directory; however any data in it  avoid this message by removing this directory; however any data in it
620  will be lost.  will be lost.
621    
622    Probably this error was caused because the first rdiff-backup session
623    into a new directory failed.  If this is the case it is safe to delete
624    the rdiff_backup_data directory because there is no important
625    information in it.
626    
627  """ % (Globals.rbdir.path,))  """ % (Globals.rbdir.path,))
628          elif len(curmir_incs) == 1: return 0          elif len(curmir_incs) == 1: return 0
629          else:          else:

Legend:
Removed from v.1.38.2.3  
changed lines
  Added in v.1.38.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26