Changeset 10463


Ignore:
Timestamp:
2005-08-10T15:25:28+12:00 (19 years ago)
Author:
mdewsnip
Message:

Removing the collection "tmp" directory is now only done when "-removeold" is specified to import.pl.

Location:
trunk/gsdl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/import.pl

    r10459 r10463  
    410410    }
    411411
    412     # remove the old contents of the archives directory if needed
    413     if ($removeold && -e $archivedir) {
    414     &gsprintf($out, "{import.removing_archives}\n");
    415     &util::rm_r ($archivedir);
     412    # remove the old contents of the archives directory (and tmp directory) if needed
     413    if ($removeold) {
     414    if (-e $archivedir) {
     415        &gsprintf($out, "{import.removing_archives}\n");
     416        &util::rm_r ($archivedir);
     417    }
     418    $tmpdir = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "tmp");
     419    $tmpdir =~ s/[\\\/]+/\//g;
     420    $tmpdir =~ s/\/$//;
     421    if (-e $tmpdir) {
     422        &gsprintf($out, "{import.removing_tmpdir}\n");
     423        &util::rm_r ($tmpdir);
     424    }
    416425    }
    417426
  • trunk/gsdl/perllib/plugins/ConvertToPlug.pm

    r10453 r10463  
    321321
    322322
    323 # Remove collection specific tmp directory and all its contents.
    324 sub cleanup_tmp_area {
    325     my $self = shift (@_);
    326 
    327     my $tmp_dirname
    328     = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, "tmp");
    329     &util::rm_r($tmp_dirname);
    330     &util::mk_dir($tmp_dirname);
    331 }
    332 
    333323# Override BasPlug read
    334324# We don't want to get language encoding stuff until after we've converted
     
    406396    # process the document
    407397    $processor->process($doc_obj);
    408     ##$self->cleanup_tmp_area();
    409398
    410399    $self->{'num_processed'} ++;
  • trunk/gsdl/perllib/strings.rb

    r10458 r10463  
    223223import.removing_archives:Removing current contents of the archives directory...
    224224
     225import.removing_tmpdir:Removing contents of the collection "tmp" directory...
     226
    225227import.sortmeta:Sort documents alphabetically by metadata for building. Search results for boolean queries will be displayed in this order. This will be disabled if groupsize > 1.
    226228
Note: See TracChangeset for help on using the changeset viewer.