Index: main/trunk/greenstone2/perllib/DBDrivers/JDBM.pm
===================================================================
--- main/trunk/greenstone2/perllib/DBDrivers/JDBM.pm	(revision 31192)
+++ main/trunk/greenstone2/perllib/DBDrivers/JDBM.pm	(revision 31208)
@@ -79,4 +79,58 @@
 
 
+# jdb also creates .lg log files, that don't get removed on delete or move operations
+# Make sure to rename them to when performing a rename operation on the main db file.
+# dbutil::renameTo(src,dest) already took care of renaming the main db file.
+sub rename_db_file_to {
+    my $self = shift(@_);   
+
+    $self->SUPER::rename_db_file_to(@_);
+    my ($srcpath, $destpath) = @_;
+
+    my ($srctailname, $srcdirname, $srcsuffix)
+	= &File::Basename::fileparse($srcpath, "\\.[^\\.]+\$");
+    my ($desttailname, $destdirname, $destsuffix)
+	= &File::Basename::fileparse($destpath, "\\.[^\\.]+\$");
+    
+    # add in the lg extension
+    my $src_log_file = &FileUtils::filenameConcatenate($srcdirname, $srctailname.".lg");
+    my $dest_log_file = &FileUtils::filenameConcatenate($destdirname, $desttailname.".lg");
+    
+    # finally, move/rename any log file belonging to the src db file
+    if(&FileUtils::fileExists($src_log_file)) {
+	&FileUtils::moveFiles($src_log_file, $dest_log_file);
+    }
+    
+    # don't want to keep the log file for any files renamed to bak (backup file) though
+    if($destsuffix =~ m/bak$/) {
+	my $assoc_log_file = &FileUtils::filenameConcatenate($destdirname, $desttailname.".lg");
+	if(&FileUtils::fileExists($assoc_log_file)) {
+	    &FileUtils::removeFiles($assoc_log_file);
+	}
+    }
+
+}
+
+sub remove_db_file {
+    my $self = shift(@_);
+
+    print STDERR "###### |".join(",", @_) . "|\n";
+
+    $self->SUPER::remove_db_file(@_);
+    my ($db_filepath) = @_;
+
+    # add in the lg extension to get the log file name
+    my ($tailname, $dirname, $suffix) = &File::Basename::fileparse($db_filepath, "\\.[^\\.]+\$");
+    my $assoc_log_file = &FileUtils::filenameConcatenate($dirname, $tailname.".lg");
+
+    # remove any log file associated with the db file
+    if(&FileUtils::fileExists($assoc_log_file)) {
+	&FileUtils::removeFiles($assoc_log_file);
+    }
+
+}
+
+
+
 # -----------------------------------------------------------------------------
 #   JDBM IMPLEMENTATION
Index: main/trunk/greenstone2/perllib/dbutil/jdbm.pm
===================================================================
--- main/trunk/greenstone2/perllib/dbutil/jdbm.pm	(revision 31192)
+++ main/trunk/greenstone2/perllib/dbutil/jdbm.pm	(revision 31208)
@@ -319,40 +319,3 @@
 
 
-# jdb also creates .lg log files, that don't get removed on delete or move operations
-# Make sure to rename them to when performing a rename operation on the main db file.
-# dbutil::renameTo(src,dest) already took care of renaming the main db file.
-sub rename_db_file_to {
-    my $infodb_handle = shift(@_);
-    my ($srcpath, $destpath) = @_;
-
-    my ($srctailname, $srcdirname, $srcsuffix)
-	= &File::Basename::fileparse($srcpath, "\\.[^\\.]+\$");
-    my ($desttailname, $destdirname, $destsuffix)
-	= &File::Basename::fileparse($destpath, "\\.[^\\.]+\$");
-
-    # add in the lg extension
-    my $src_log_file = &FileUtils::filenameConcatenate($srcdirname, $srctailname.".lg");
-    my $dest_log_file = &FileUtils::filenameConcatenate($destdirname, $desttailname.".lg");
-
-    # finally, move/rename any log file belonging to the src db file
-    if(&FileUtils::fileExists($src_log_file)) {
-	&FileUtils::moveFiles($src_log_file, $dest_log_file);
-    }
-}
-
-sub remove_db_file {
-    my $infodb_handle = shift(@_);
-    my ($db_filepath) = @_;
-
-    # add in the lg extension to get the log file name
-    my ($tailname, $dirname, $suffix) = &File::Basename::fileparse($db_filepath, "\\.[^\\.]+\$");
-    my $assoc_log_file = &FileUtils::filenameConcatenate($dirname, $tailname.".lg");
-
-    # remove any log file associated with the db file
-    if(&FileUtils::fileExists($assoc_log_file)) {
-	&FileUtils::removeFiles($assoc_log_file);
-    }
-
-}
-
 1;
Index: main/trunk/greenstone2/perllib/oaiinfo.pm
===================================================================
--- main/trunk/greenstone2/perllib/oaiinfo.pm	(revision 31192)
+++ main/trunk/greenstone2/perllib/oaiinfo.pm	(revision 31208)
@@ -509,11 +509,4 @@
     foreach my $oid ( keys $self->{'info'} ) {
 	my $OID_info = $self->{'info'}->{$oid};
-	#my $val_hash = { 
-	#    "status" => $OID_info->[INFO_STATUS_INDEX],
-	#    "timestamp" => $OID_info->[INFO_TIMESTAMP_INDEX] 
-	#};	
-	
-	#&dbutil::write_infodb_rawentry($infodbtype,$infodb_handle,$oid,$val_hash);
-
 	my $val = "<status>".$OID_info->[INFO_STATUS_INDEX]."\n<timestamp>".$OID_info->[INFO_TIMESTAMP_INDEX]."\n";
 	&dbutil::write_infodb_rawentry($infodbtype,$infodb_handle,$oid,$val);
