Added tmp-file cleanup, including the cached entry, currently only for Excel.

This commit is contained in:
RKrom 2014-02-07 13:29:54 +01:00
commit fa79ebb727
2 changed files with 21 additions and 2 deletions

View file

@ -124,8 +124,8 @@ namespace GreenshotOfficePlugin {
exportInformation.ExportMade = true;
ProcessExport(exportInformation, surface);
// Cleanup imageFile if we created it here, so less tmp-files are generated and left
if (createdFile && File.Exists(imageFile)) {
File.Delete(imageFile);
if (createdFile) {
ImageOutput.DeleteNamedTmpFile(imageFile);
}
return exportInformation;
}