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.

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.