Changeset 18463 for gsdl


Ignore:
Timestamp:
02/05/09 10:06:24 (12 years ago)
Author:
davidb
Message:

Warning about file copying in event that a hard link operation is not supported altered to only appear if verbosity > 2

Location:
gsdl/trunk/perllib
Files:
4 edited

Legend:

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

    r18456 r18463  
    782782        $afile = &util::filename_cat($self->{'assocdir'}, $archivedir, $assoc_file->[1]);
    783783    }
    784     &util::hard_link ($assoc_file->[0], $afile);
    785     }
    786 }
    787 
     784    &util::hard_link ($assoc_file->[0], $afile, $self->{'verbosity'});
     785    }
     786}
     787
  • gsdl/trunk/perllib/plugouts/BasePlugout.pm

    r18441 r18463  
    627627        $filename = &util::filename_cat($working_dir, $afile);
    628628
    629         &util::hard_link ($real_filename, $filename);
     629        &util::hard_link ($real_filename, $filename, $self->{'verbosity'});
    630630       
    631631        $doc_obj->add_utf8_metadata ($doc_obj->get_top_section(),
  • gsdl/trunk/perllib/plugouts/DSpacePlugout.pm

    r17203 r18463  
    165165   
    166166    $filename = &util::filename_cat($working_dir, $tail_filename);
    167     &util::hard_link ($source_filename, $filename);
     167    &util::hard_link ($source_filename, $filename, $self->{'verbosity'});
    168168             
    169169    # set the assocfile path (even if we have no assoc files - need this for lucene)
     
    199199       
    200200       
    201         &util::hard_link ($real_filename, $filename);
     201        &util::hard_link ($real_filename, $filename, $self->{'verbosity'});
    202202       
    203203        $doc_obj->add_utf8_metadata ($doc_obj->get_top_section(),
  • gsdl/trunk/perllib/util.pm

    r18441 r18463  
    358358# make hard link to file if supported by OS, otherwise copy the file
    359359sub hard_link {
    360     my ($src, $dest) = @_;
     360    my ($src, $dest, $verbosity) = @_;
    361361
    362362    # remove trailing slashes from source and destination files
     
    386386
    387387    } elsif (!link($src, $dest)) {
    388     print STDERR "util::hard_link: unable to create hard link. ";
    389     print STDERR " Attempting to copy file: $src -> $dest\n";
     388    if ((!defined $verbosity) || ($verbosity>2)) {
     389        print STDERR "util::hard_link: unable to create hard link. ";
     390        print STDERR " Copying file: $src -> $dest\n";
     391    }
    390392    &File::Copy::copy ($src, $dest);
    391393    }
Note: See TracChangeset for help on using the changeset viewer.