IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

if destination file already exists, delete it. This happens if previous attempts at
registration failed due to file system problems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataStoreServer/scripts/dsreg

    r28789 r28800  
    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.