Commit 69ff1303 authored by bescoto's avatar bescoto

Fixed Popple's symlink bug which threatened source directory


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@575 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 68f1315b
......@@ -4,6 +4,12 @@ New in v0.13.6 (2005/??/??)
Added fix for listing/restoring certain bad archives made when there
was a timezone bug. (Thanks to Stephen Isard)
************** Serious bug fix ******************
If a directory in the source directory was replaced by certain
symlinks, then if later backups failed they could cause files in the
directory that the symlink pointed to to be deleted! Much thanks to
Alistair Popple for pointing this bug out and providing a test case.
New in v0.13.5 (2005/03/28)
---------------------------
......
......@@ -542,7 +542,7 @@ as data loss may result.\n""" % (self.mirror_rp.get_indexpath(),), 2)
inc_list = []
else: inc_rp, inc_list = inc_pair
if not mirror_rp:
mirror_rp = self.mirror_rp.new_index(inc_rp.index)
mirror_rp = self.mirror_rp.new_index_empty(inc_rp.index)
yield self.__class__(mirror_rp, inc_rp, inc_list)
def yield_mirrorrps(self, mirrorrp):
......
......@@ -913,6 +913,10 @@ class RPath(RORPath):
"""Return similar RPath but with new index"""
return self.__class__(self.conn, self.base, index)
def new_index_empty(self, index):
"""Return similar RPath with given index, but initialize to empty"""
return self.__class__(self.conn, self.base, index, {'type': None})
def open(self, mode, compress = None):
"""Return open file. Supports modes "w" and "r".
......
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