IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28801


Ignore:
Timestamp:
Jul 30, 2010, 10:14:35 AM (16 years ago)
Author:
bills
Message:

from trunk. Delete destination file if it already exists.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20100701/DataStoreServer/scripts/dsreg

    r28790 r28801  
    332332
    333333                    if ( !-e $src or !-r $src) {
    334                         print STDERR "file $src does not exist or is not accessible\n";
     334                        print STDERR "source file $src does not exist or is not accessible\n";
    335335                        exit $PS_EXIT_SYS_ERROR;
    336336                    }
     337                    if ( -e $dest ) {
     338                        print STDERR "destination $dest already exists removing\n";
     339                        if (! unlink $dest ) {
     340                            print STDERR "failed trying to unlink $dest\n";
     341                            exit $PS_EXIT_SYS_ERROR;
     342                        }
     343                    }
     344
    337345                    if ($linkfiles) {
    338346                        if (! symlink $src, $dest) {
Note: See TracChangeset for help on using the changeset viewer.