You've already forked lazarus-ccr
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:
@ -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;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user