fpspreadsheet: Avoid orphaned tempory files if workbook Options contain boFileStream.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4549 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-03-13 23:29:08 +00:00
parent b78383bc8f
commit da0eddc8e4

View File

@ -352,9 +352,10 @@ begin
if AStream is TFileStream then
begin
fn := TFileStream(AStream).Filename;
DeleteFile(fn);
end;
AStream.Free;
AStream.Free; // Destroy stream before deleting temp file!
DeleteFile(fn); // Otherwise the temp file will not be deleted.
end else
AStream.Free;
end;