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
|
if AStream is TFileStream then
|
||||||
begin
|
begin
|
||||||
fn := TFileStream(AStream).Filename;
|
fn := TFileStream(AStream).Filename;
|
||||||
DeleteFile(fn);
|
AStream.Free; // Destroy stream before deleting temp file!
|
||||||
end;
|
DeleteFile(fn); // Otherwise the temp file will not be deleted.
|
||||||
AStream.Free;
|
end else
|
||||||
|
AStream.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user