Index: /main/trunk/greenstone2/perllib/plugins/ArchivesInfPlugin.pm
===================================================================
--- /main/trunk/greenstone2/perllib/plugins/ArchivesInfPlugin.pm	(revision 23418)
+++ /main/trunk/greenstone2/perllib/plugins/ArchivesInfPlugin.pm	(revision 23419)
@@ -202,5 +202,5 @@
 	my ($filename_full_path, $filename_no_path) 
 	    = &util::get_full_filenames($base_dir, $file);
-	$block_hash->{'file_blocks'}->{$filename_full_path} = 1;
+	$self->block_filename($block_hash,$filename_full_path);
 	return 1;
     }
Index: /main/trunk/greenstone2/perllib/plugins/BasePlugin.pm
===================================================================
--- /main/trunk/greenstone2/perllib/plugins/BasePlugin.pm	(revision 23418)
+++ /main/trunk/greenstone2/perllib/plugins/BasePlugin.pm	(revision 23419)
@@ -382,4 +382,25 @@
 }
 
+sub block_filename
+{
+	my $self = shift(@_);
+	my ($block_hash,$filename) = @_;
+	
+	if ($ENV{'GSDLOS'} =~ m/^windows$/) {
+		
+		my $lower_drive = $filename;
+		$lower_drive =~ s/^([A-Z]):/\l$1:/i;
+		
+		my $upper_drive = $filename;
+		$upper_drive =~ s/^([A-Z]):/\u$1:/i;
+		
+		$block_hash->{'file_blocks'}->{$lower_drive} = 1;
+		$block_hash->{'file_blocks'}->{$upper_drive} = 1;		
+	}
+	else {
+		$block_hash->{'file_blocks'}->{$filename} = 1;
+	}
+}
+
 # rename imported files and assoc files using URL encoding by default
 # as this will work for most plugins and give more legible filenames
@@ -417,5 +438,5 @@
 
     if ($self->{'block_exp'} ne "" && $filename_full_path =~ /$self->{'block_exp'}/) {
-	$block_hash->{'file_blocks'}->{$filename_full_path} = 1;
+	$self->block_filename($block_hash,$filename_full_path);
     }
 
@@ -437,5 +458,5 @@
 	} 	
 	if (&util::fd_exists($coverfile)) {
-	    $block_hash->{'file_blocks'}->{$coverfile} = 1;
+	    $self->block_filename($block_hash,$coverfile);
 	} 
     }
@@ -1169,5 +1190,10 @@
     my ($textref, $pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_;
 
-    gsprintf(STDERR, "BasePlugin::process {common.must_be_implemented}\n") && die "\n";
+    gsprintf(STDERR, "BasePlugin::process {common.must_be_implemented}\n");
+
+	my ($cpackage,$cfilename,$cline,$csubr,$chas_args,$cwantarray) = caller(1);
+    print STDERR "Calling method: $cfilename:$cline $cpackage->$csubr\n";
+
+	die "\n";
 
     return undef; # never gets here
Index: /main/trunk/greenstone2/perllib/plugins/DSpacePlugin.pm
===================================================================
--- /main/trunk/greenstone2/perllib/plugins/DSpacePlugin.pm	(revision 23418)
+++ /main/trunk/greenstone2/perllib/plugins/DSpacePlugin.pm	(revision 23419)
@@ -148,5 +148,7 @@
     my $handle_filename = &util::filename_cat($contents_basedir,"handle");
 
-    $block_hash->{'file_blocks'}->{$handle_filename} = 1 if (-e $handle_filename);
+    if (&util::fd_exists($handle_filename)) {
+	$self->block_filename($block_hash,$handle_filename);
+    }
 }
 
Index: /main/trunk/greenstone2/perllib/plugins/DirectoryPlugin.pm
===================================================================
--- /main/trunk/greenstone2/perllib/plugins/DirectoryPlugin.pm	(revision 23418)
+++ /main/trunk/greenstone2/perllib/plugins/DirectoryPlugin.pm	(revision 23419)
@@ -235,5 +235,5 @@
 	    foreach my $e (keys %$exts) {
 		# block the file
-		$block_hash->{'file_blocks'}->{"$prefix$e"} = 1;
+		$self->block_filename($block_hash,"$prefix$e");
 		# set up as an associatd file
 		print STDERR "  $self->{'plugin_type'}: Associating $prefix$e with $tie_to version\n";
@@ -333,4 +333,5 @@
     $self->sort_out_associated_files($block_hash);
     #return $count;
+	return 1;
     
 }
Index: /main/trunk/greenstone2/perllib/plugins/GreenstoneXMLPlugin.pm
===================================================================
--- /main/trunk/greenstone2/perllib/plugins/GreenstoneXMLPlugin.pm	(revision 23418)
+++ /main/trunk/greenstone2/perllib/plugins/GreenstoneXMLPlugin.pm	(revision 23419)
@@ -123,5 +123,5 @@
 		}
 
-		$block_hash->{'file_blocks'}->{$full_gsdl_assoc_filename} = 1;
+		$self->block_filename($block_hash,$full_gsdl_assoc_filename);		
 	    }
 	}
Index: /main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm
===================================================================
--- /main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm	(revision 23418)
+++ /main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm	(revision 23419)
@@ -281,30 +281,10 @@
 
 	    # Allow for possibility of raw byte version and Unicode versions of file
-	    $block_hash->{'file_blocks'}->{$unicode_url_original_filename} = 1;
-
+	    $self->block_filename($block_hash,$unicode_url_original_filename);
 	}
 
 	# $url_original_filename = &util::upgrade_if_dos_filename($url_original_filename);
 	
-	
-	$block_hash->{'file_blocks'}->{$url_original_filename} = 1;
-	if ($ENV{'GSDLOS'} =~ m/^windows$/) {
-		
-		my $lower_drive = $url_original_filename;
-		$lower_drive =~ s/^([A-Z]):/\l$1:/i;
-		my $upper_drive = $url_original_filename;
-		
-		$upper_drive =~ s/^([A-Z]):/\u$1:/i;
-
-##		print STDERR "**** HTML plugin, blocking: \"$lower_drive\"\n";
-##		print STDERR "**** HTML plugin, blocking: \"$upper_drive\"\n";
-		
-		$block_hash->{'file_blocks'}->{$lower_drive} = 1;
-		$block_hash->{'file_blocks'}->{$upper_drive} = 1;		
-	}
-	else {
-##		print STDERR "**** HTML plugin, blocking: $url_original_filename\n";
-		$block_hash->{'file_blocks'}->{$url_original_filename} = 1;
-	}
+	$self->block_filename($block_hash,$url_original_filename);
 		
     }
Index: /main/trunk/greenstone2/perllib/plugins/ISISPlugin.pm
===================================================================
--- /main/trunk/greenstone2/perllib/plugins/ISISPlugin.pm	(revision 23418)
+++ /main/trunk/greenstone2/perllib/plugins/ISISPlugin.pm	(revision 23419)
@@ -136,10 +136,10 @@
 	print STDERR "$self->{'fdt_file_path'}\n";
 	my $fdt_file = $self->{'fdt_file_path'};
-	$block_hash->{'file_blocks'}->{$fdt_file} = 1;
+	$self->block_filename($block_hash,$fdt_file);
     }
     if (-e $self->{'xrf_file_path'}) {
 	print STDERR "$self->{'xrf_file_path'}\n";
 	my $xrf_file = $self->{'xrf_file_path'};
-	$block_hash->{'file_blocks'}->{$xrf_file} = 1;
+	$self->block_filename($block_hash,$xrf_file);
     }
     
Index: /main/trunk/greenstone2/perllib/plugins/MetadataCSVPlugin.pm
===================================================================
--- /main/trunk/greenstone2/perllib/plugins/MetadataCSVPlugin.pm	(revision 23418)
+++ /main/trunk/greenstone2/perllib/plugins/MetadataCSVPlugin.pm	(revision 23419)
@@ -113,5 +113,5 @@
 
     # add the file to the block list so that it won't be processed in read, as we will do all we can with it here
-    $block_hash->{'file_blocks'}->{$filename} = 1;
+    $self->block_filename($block_hash,$filename);
 
     # Read the CSV file to get the metadata
Index: /main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm
===================================================================
--- /main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm	(revision 23418)
+++ /main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm	(revision 23419)
@@ -214,9 +214,22 @@
     my $self = shift (@_);
     my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $gli) = @_;
-
+	
     my $filename_full_path = &util::filename_cat($base_dir, $file);
     return undef unless $self->can_process_this_file($filename_full_path);    
 
-    $block_hash->{'metadata_files'}->{$filename_full_path} = 1;
+	if ($ENV{'GSDLOS'} =~ m/^windows$/) {
+		
+		my $lower_drive = $filename_full_path;
+		$lower_drive =~ s/^([A-Z]):/\l$1:/i;
+		
+		my $upper_drive = $filename_full_path;
+		$upper_drive =~ s/^([A-Z]):/\u$1:/i;
+		
+		$block_hash->{'metadata_files'}->{$lower_drive} = 1;
+		$block_hash->{'metadata_files'}->{$upper_drive} = 1;		
+	}
+	else {
+		$block_hash->{'metadata_files'}->{$filename_full_path} = 1;
+	}
 
     return 1;
@@ -235,5 +248,5 @@
     $self->{'metadata-file'} = $file;
     $self->{'metadata-filename'} = $filename;
-
+	
     my $outhandle = $self->{'outhandle'};
     
@@ -241,5 +254,5 @@
     print $outhandle "MetadataXMLPlugin: processing $file\n" if ($self->{'verbosity'})> 1;
     # add the file to the block list so that it won't be processed in read, as we will do all we can with it here
-    $block_hash->{'file_blocks'}->{$filename} = 1;
+    $self->block_filename($block_hash,$filename);
 
     $self->{'metadataref'} = $extrametadata;
Index: /main/trunk/greenstone2/perllib/plugins/PagedImagePlugin.pm
===================================================================
--- /main/trunk/greenstone2/perllib/plugins/PagedImagePlugin.pm	(revision 23418)
+++ /main/trunk/greenstone2/perllib/plugins/PagedImagePlugin.pm	(revision 23419)
@@ -576,8 +576,8 @@
 
 	if ($line =~ /imgfile=\"([^\"]+)\"/) {
-	    $block_hash->{'file_blocks'}->{$dir.$1} = 1;
+	    $self->block_filename($block_hash,$dir.$1);
 	}
 	if ($line =~ /txtfile=\"([^\"]+)\"/) {
-	    $block_hash->{'file_blocks'}->{$dir.$1} = 1;
+	    $self->block_filename($block_hash,$dir.$1);
 	}
     }
@@ -605,9 +605,9 @@
 	# find the image file if there is one
 	if (defined $imgname && $imgname ne "") {
-	    $block_hash->{'file_blocks'}->{$dir.$imgname}=1;
+	    $self->block_filename($block_hash,$dir.$imgname);
 	}
 	# find the text file if there is one
 	if (defined $txtname && $txtname ne "") {
-	    $block_hash->{'file_blocks'}->{$dir.$txtname} = 1;
+	    $self->block_filename($block_hash,$dir.$txtname);
 	}
     }
