Changeset 18508 for gsdl


Ignore:
Timestamp:
02/11/09 17:42:17 (12 years ago)
Author:
davidb
Message:

Had to move location of where deletion of archive files was done

Location:
gsdl/trunk/perllib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/basebuildproc.pm

    r18471 r18508  
    1 ###########################################################################
     1##########################################################################
    22#
    33# basebuildproc.pm --
  • gsdl/trunk/perllib/classify/BaseClassifier.pm

    r18455 r18508  
    308308    foreach my $existing_oid (@{$self->{$field}}) {
    309309    if ($existing_oid eq $delete_oid) {
    310         print $outhandle "  Deleting $delete_oid\n";
     310        print $outhandle "  Deleting $delete_oid for ", ref $self, "\n";
    311311    }
    312312    else {
     
    324324    my $outhandle = $self->{'outhandle'};
    325325
    326     print $outhandle "  Deleting $delete_oid\n";
     326    print $outhandle "  Deleting $delete_oid for ", ref $self, "\n";
    327327    delete $self->{$field}->{$delete_oid};
    328328}
  • gsdl/trunk/perllib/classify/GenericList.pm

    r18455 r18508  
    233233    return if (!$classify_section);
    234234
    235     if ($edit_mode eq "delete") {
     235
     236    if (($edit_mode eq "delete") || ($edit_mode eq "update")) {
    236237    $self->oid_array_delete($section_OID,'OIDs');
    237     return;
     238    if ($edit_mode eq "delete") {
     239        return;
     240    }
    238241    }
    239242   
  • gsdl/trunk/perllib/doc.pm

    r18319 r18508  
    6767    if (defined $source_filename) {
    6868    $source_filename = &util::filename_within_collection($source_filename);
    69     print STDERR "******doc.pm::new(): no file rename method provided\n" unless $rename_method;
     69    print STDERR "****** doc.pm::new(): no file rename method provided\n" unless $rename_method;
    7070    $self->set_source_filename ($source_filename, $rename_method);
    7171    }
  • gsdl/trunk/perllib/inexport.pm

    r18469 r18508  
    169169            $val =~ s/^<index-status>(.*)$/<index-status>D/m;
    170170            &GDBMUtils::gdbmDatabaseSet($arcinfo_doc_filename,$oid,$val);
    171             my $doc_file = $doc_rec->{'doc-file'}->[0];
    172 
    173             my $doc_filename = &util::filename_cat($archivedir,$doc_file);
    174 
    175 
    176             my ($doc_tailname, $doc_dirname, $suffix)
    177             = File::Basename::fileparse($doc_filename, "\\.[^\\.]+\$");
    178 
    179             print STDERR "Removing $doc_dirname\n" if ($verbosity>2);
    180 
    181             &util::rm_r($doc_dirname);
    182            
    183171        }
    184172        }
     
    258246
    259247
     248
    2602491;
  • gsdl/trunk/perllib/plugins/ArchivesInfPlugin.pm

    r18469 r18508  
    8888
    8989    my $archive_info = $self->{'archive_info'};
     90    my $verbosity = $self->{'verbosity'};
     91    my $outhandle = $self->{'outhandle'};
    9092
    9193    if (defined $archive_info) {
     
    98100
    99101        my $index_status = $archive_info->get_status_info($doc_oid);
    100 ####        print STDERR "*** Away to Update $doc_oid $index_status\n";
    101102
    102103        if ($index_status eq "D") {
     
    104105        $archive_info->delete_info($doc_oid);
    105106        &GDBMUtils::gdbmDatabaseRemove($archive_info_filename,$doc_oid);
     107
     108        my $doc_file = $subfile->[0];
     109        my $base_dir =$self->{'base_dir'};
     110
     111        my $doc_filename = &util::filename_cat($base_dir,$doc_file);
     112
     113        my ($doc_tailname, $doc_dirname, $suffix)
     114            = File::Basename::fileparse($doc_filename, "\\.[^\\.]+\$");
     115
     116        print STDERR "Removing $doc_dirname\n" if ($verbosity>2);
     117
     118        &util::rm_r($doc_dirname);
     119
     120
    106121        }
    107122        elsif ($index_status =~ m/^(I|R)$/) {
     
    120135    my ($pluginfo, $base_dir, $processor, $maxdocs) = @_;
    121136
     137    $self->{'base_dir'} = $base_dir;
    122138}
    123139
     
    257273        }
    258274
    259 
    260 
    261275        if ($process_file) {
    262276        # note: metadata is not carried on to the next level
Note: See TracChangeset for help on using the changeset viewer.