[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] [PATCH] Fix for bug in regressing

From: Andrew Ferguson
Subject: Re: [rdiff-backup-users] [PATCH] Fix for bug in regressing
Date: Fri, 9 May 2008 08:50:45 -0400

On May 9, 2008, at 8:37 AM, Josh Nisly wrote:
The problem is occurs when we are trying to regress the mirror_metadata file, and the file is compressed. The code in recreate_meta() in regress.py creates a temporary filename, tells the metadata writer to create the file, then moves it to the correct location. The problem is that the metadata writer may actually create the filename with a .gz extension, so when recreate_meta() tries to rename the file, it doesn't exist. (At that point, since the source doesn't exist, it tries to delete the destination file, which is why the error message references the filename it does.)

I believe the correct solution is to pass a callback into the metadata writer that is told what the actual filename written is. Attached is a patch to do this.

Yup. That's clearly it.

Quick question before I commit the fix -- is it necessary to make temprp a list? My internal Python interpreter is not fully loaded this morning...


-       writer = metadata.MetadataFile(temprp, 'w', check_path = 0)
+       def callback(rp): temprp = rp
+ writer = metadata.MetadataFile(temprp, 'w', check_path = 0, callback = callback)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]