[PATCH] sqlite briefly creates a journal file by appending -journal; ignore it, as well

Alex Vandiver alexmv at bestpractical.com
Mon Apr 12 18:52:04 UTC 2010


This is a race condition; it actually bit me beacuse brackup fails if
a file gets removed out from under it -- in this case, its own SQLite
journal file.  If I have time, I'll see how hard fixing the underlying
"file went away between building file-list and reading the file"
problem is to fix.  IMHO it should wand but not abort the whole

Since this isn't an attachment, hopefully the archives will actually
pick it up this time.
 - Alex

 lib/Brackup/Root.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/Brackup/Root.pm b/lib/Brackup/Root.pm
index c6caa6d..6156f17 100644
--- a/lib/Brackup/Root.pm
+++ b/lib/Brackup/Root.pm
@@ -130,7 +130,7 @@ sub foreach_file {
                 foreach my $pattern (@{ $self->{ignore} }) {
                     next DENTRY if $path =~ /$pattern/;
                     next DENTRY if $is_dir && "$path/" =~ /$pattern/;
-                    next DENTRY if $path =~ m!(^|/)\.brackup-digest\.db$!;
+                    next DENTRY if $path =~ m!(^|/)\.brackup-digest\.db(-journal)?$!;
                 $statcache{$path} = $statobj;

More information about the brackup mailing list