IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33361


Ignore:
Timestamp:
Feb 24, 2012, 7:50:33 AM (14 years ago)
Author:
eugene
Message:

add a comment; do not rename or unlink original if it does not exist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/photdbc/src/CopyToHostLocation.c

    r33303 r33361  
    9595       
    9696      // need to re-open and re-read tgtname to check md5sum
     97      // XXX this would be safer and faster if we used the remote shell to perform the md5sum locally. 
    9798      if (!get_md5_with_copy (tgtname, NULL, tgtDigest)) {
    9899        fprintf (stderr, "error reading %s or getting md5\n", tgtname);
     
    134135        sprintf (tgtname, "%s/%s.%s", host->pathname, skylist->regions[i]->name, extname[j]);
    135136        sprintf (srcname, "%s/%s.%s", catdir, skylist->regions[i]->name, extname[j]);
     137
     138        // do not rename or unlink original if it does not exist..
     139        status = stat (srcname, &filestat);
     140        if (status && (errno == ENOENT)) continue; 
     141       
    136142        if (!DEBUG && DELETE_ORIGINAL) {
    137143          unlink (srcname);
Note: See TracChangeset for help on using the changeset viewer.