[Bps-public-commit] r11373 - SVN-PropDB/lib/Prophet

clkao at bestpractical.com clkao at bestpractical.com
Tue Apr 1 23:13:41 EDT 2008


Author: clkao
Date: Tue Apr  1 23:13:41 2008
New Revision: 11373

Modified:
   SVN-PropDB/lib/Prophet/Handle.pm

Log:
check nonexisting dir properly if we have txn already.


Modified: SVN-PropDB/lib/Prophet/Handle.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Handle.pm	(original)
+++ SVN-PropDB/lib/Prophet/Handle.pm	Tue Apr  1 23:13:41 2008
@@ -60,7 +60,10 @@
 sub _create_nonexistent_dir {
     my $self = shift;
     my $dir  = shift;
-    unless ( $self->current_root->is_dir($dir) ) {
+    
+    my $root = $self->current_edit ? $self->current_edit->root : $self->current_root;
+    
+    unless ( $root->is_dir($dir) ) {
         my $inside_edit = $self->current_edit ? 1: 0;
         $self->begin_edit() unless ($inside_edit);
         $self->current_edit->root->make_dir($dir);



More information about the Bps-public-commit mailing list