[Bps-public-commit] Prophet branch, master, updated. 5282d94052a2c53199c336f7372ec58265045c85

Alex M Vandiver alexmv at bestpractical.com
Mon Apr 27 15:23:32 EDT 2009


The branch, master has been updated
       via  5282d94052a2c53199c336f7372ec58265045c85 (commit)
      from  c096fd7ff607e4f3ebb7096a3fdb12d4521a28f9 (commit)

Summary of changes:
 lib/Prophet/Replica/file.pm |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 5282d94052a2c53199c336f7372ec58265045c85
Author: Alex Vandiver <alexmv at mit.edu>
Date:   Mon Apr 27 15:23:29 2009 -0400

    You also need a database-uuid file to be a file:// prophet replica

diff --git a/lib/Prophet/Replica/file.pm b/lib/Prophet/Replica/file.pm
index f5857ac..ec7c42b 100644
--- a/lib/Prophet/Replica/file.pm
+++ b/lib/Prophet/Replica/file.pm
@@ -4,7 +4,9 @@ sub scheme { 'file' }
 
 sub replica_exists {
     my $self = shift;
-    return -d $self->fs_root ? 1 : 0;
+    return 0 unless -d $self->fs_root;
+    return 0 unless -e File::Spec->catfile( $self->fs_root => 'database-uuid' );
+    return 1;
 }
 
 sub new {

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list