Changeset 2193


Ignore:
Timestamp:
2001-03-19T10:46:39+12:00 (23 years ago)
Author:
sjboddie
Message:

soft_link function now acts as a simple "copy" function on windows

File:
1 edited

Legend:

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

    r2039 r2193  
    298298    mk_all_dir($dest_dir) if (!-e $dest_dir);
    299299
    300     # link not supported on wondows
     300    # link not supported on windows
    301301    if ($ENV{'GSDLOS'} =~ /^windows$/i) {
    302302    &File::Copy::copy ($src, $dest);
     
    309309}
    310310
    311 # make soft link to file if supported by OS, otherwise return error
     311# make soft link to file if supported by OS, otherwise copy file
    312312sub soft_link {
    313313    my ($src, $dest) = @_;
     
    326326    mk_all_dir($dest_dir) if (!-e $dest_dir);
    327327
    328     if (!eval {symlink($src, $dest)})
    329     {
     328    if ($ENV{'GSDLOS'} =~ /^windows$/i) {
     329    # symlink not supported on windows
     330    &File::Copy::copy ($src, $dest);
     331
     332    } elsif (!eval {symlink($src, $dest)}) {
    330333    print STDERR "util::soft_link: unable to create soft link.";
    331334    return 0;
Note: See TracChangeset for help on using the changeset viewer.