mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
map image service: always try to delete a map tile, before saving a new one; ubode cosmetics that where on disk"
This commit is contained in:
@@ -148,7 +148,6 @@ namespace OpenSim.Services.MapImageService
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
m_log.WarnFormat("[MAP IMAGE SERVICE]: Unable to save delete file {0}: {1}", fileName, e);
|
||||
reason = e.Message;
|
||||
return false;
|
||||
@@ -157,7 +156,6 @@ namespace OpenSim.Services.MapImageService
|
||||
return UpdateMultiResolutionFiles(x, y, scopeID, out reason);
|
||||
}
|
||||
|
||||
|
||||
// When large varregions start up, they can send piles of new map tiles. This causes
|
||||
// this multi-resolution routine to be called a zillion times an causes much CPU
|
||||
// time to be spent creating multi-resolution tiles that will be replaced when
|
||||
@@ -361,22 +359,16 @@ namespace OpenSim.Services.MapImageService
|
||||
ntiles++;
|
||||
}
|
||||
|
||||
// Write the modified output
|
||||
if (ntiles == 0)
|
||||
File.Delete(outputFile);
|
||||
|
||||
else
|
||||
try
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
File.Delete(outputFile);
|
||||
if (ntiles > 0)
|
||||
output.Save(outputFile, ImageFormat.Jpeg);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.WarnFormat("[MAP IMAGE SERVICE]: Oops on saving {0} {1}", outputFile, e);
|
||||
}
|
||||
} // Save also as png?
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.WarnFormat("[MAP IMAGE SERVICE]: Oops on saving {0} {1}", outputFile, e);
|
||||
}
|
||||
|
||||
output.Dispose();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user