IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 12, 2009, 4:38:34 PM (16 years ago)
Author:
Paul Price
Message:

Fix SEGV from doing cleanup in wrong place. Moved deletion of temporary files to ppStackFinish().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackCleanup.c

    r26076 r26117  
    44
    55#include <stdio.h>
    6 #include <unistd.h>
    76#include <pslib.h>
    87#include <psmodules.h>
     
    2221    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe
    2322    psAssert(recipe, "We've thrown an error on this before.");
    24 
    25     bool mdok;                          // Status of MD lookup
    26     bool tempDelete = psMetadataLookupBool(&mdok, recipe, "TEMP.DELETE"); // Delete temporary files?
    2723
    2824#if 0
     
    7268            }
    7369        }
    74 
    75         if (tempDelete) {
    76             psString imageResolved = pmConfigConvertFilename(options->convImages->data[i],
    77                                                              config, false, false);
    78             psString maskResolved = pmConfigConvertFilename(options->convMasks->data[i],
    79                                                             config, false, false);
    80             psString varianceResolved = pmConfigConvertFilename(options->convVariances->data[i],
    81                                                                 config, false, false);
    82             if (unlink(imageResolved) == -1 || unlink(maskResolved) == -1 ||
    83                 unlink(varianceResolved) == -1) {
    84                 psWarning("Unable to delete temporary files for image %d", i);
    85             }
    86             psFree(imageResolved);
    87             psFree(maskResolved);
    88             psFree(varianceResolved);
    89         }
    9070    }
    9171
Note: See TracChangeset for help on using the changeset viewer.