Ignore:
Timestamp:
Mar 18, 2015, 7:59:09 AM (10 years ago)
Author:
ldelgass
Message:

Delete colormap files in ~Renderer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • geovis/trunk/Renderer.cpp

    r5118 r5151  
    143143    TRACE("Enter");
    144144
     145    // Removes temp files
     146    deleteColorMap("all");
     147
    145148    // Cache is deleted in main() to allow ref-counted objects to
    146149    // be deleted and threads to exit first
     
    258261
    259262    do {
    260         if (itr->first.compare("default") == 0 ||
    261             itr->first.compare("grayDefault") == 0) {
    262             if (id.compare("all") != 0) {
    263                 WARN("Cannot delete a default color map");
    264             }
    265             continue;
    266         }
    267 
    268263        TRACE("Deleting ColorMap %s", itr->first.c_str());
     264        std::string path = getColorMapFilePath(itr->first);
     265        if (remove(path.c_str()) < 0) {
     266            ERROR("Failed to delete colormap file '%s': %s",
     267                  path.c_str(), strerror(errno));
     268        }
    269269        itr = _colorMaps.erase(itr);
    270270    } while (doAll && itr != _colorMaps.end());
Note: See TracChangeset for help on using the changeset viewer.