diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-02-18 08:18:45 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-02-18 08:18:45 +0000 |
commit | 716fa96b9cbf2570e381de0abb475d341487c2d6 (patch) | |
tree | 5704e34ef06a6750e39522fe051cd1dd7047dde2 /rdiff-backup/rdiff_backup/rpath.py | |
parent | 0ad90ffd146e3ed6c920772c4a9542198d8059bc (diff) | |
download | rdiff-backup-716fa96b9cbf2570e381de0abb475d341487c2d6.tar.gz |
Various modifications to backup, restore, and regress systems.
This version passes many tests but not all of them. The backup patch
system was copied to restore.py.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@281 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/rpath.py')
-rw-r--r-- | rdiff-backup/rdiff_backup/rpath.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py index 48e98ed..7d7c440 100644 --- a/rdiff-backup/rdiff_backup/rpath.py +++ b/rdiff-backup/rdiff_backup/rpath.py @@ -90,7 +90,7 @@ def copy(rpin, rpout, compress = 0): if rpout.lstat(): if rpin.isreg() or not cmp(rpin, rpout): - rpout.delete() # easier to write that compare + rpout.delete() # easier to write than compare else: return if rpin.isreg(): copy_reg_file(rpin, rpout, compress) @@ -177,7 +177,7 @@ def cmp_attribs(rp1, rp2): elif rp1.ischardev() and rp2.ischardev(): result = 1 else: result = (rp1.getmtime() == rp2.getmtime()) log.Log("Compare attribs of %s and %s: %s" % - (rp1.path, rp2.path, result), 7) + (rp1.get_indexpath(), rp2.get_indexpath(), result), 7) return result def copy_with_attribs(rpin, rpout, compress = 0): @@ -694,11 +694,7 @@ class RPath(RORPath): def delete(self): """Delete file at self.path. Recursively deletes directories.""" log.Log("Deleting %s" % self.path, 7) - self.setdata() - if not self.lstat(): - log.Log("Warning: %s does not exist---deleted in meantime?" - % (self.path,), 2) - elif self.isdir(): + if self.isdir(): try: self.rmdir() except os.error: shutil.rmtree(self.path) else: self.conn.os.unlink(self.path) |