You've already forked lazarus-ccr
fpspreadsheet: In fpolebasic manually delete an existing file before writing; this seems to fix a crash with Linux.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3367 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -57,7 +57,12 @@ var
|
||||
tmpStream: TStream; // workaround to a compiler bug, see bug 22370
|
||||
begin
|
||||
VLAbsolutePath:='/'+AStreamName; //Virtual layer always use absolute paths.
|
||||
if not AOverwriteExisting and FileExists(AFileName) then begin
|
||||
if FileExists(AFileName) then begin
|
||||
if AOverwriteExisting then
|
||||
DeleteFile(AFileName)
|
||||
// In Ubuntu is seems that fmCreate does not erase an existing file.
|
||||
// Therefore we delete it manually.
|
||||
else
|
||||
Raise EStreamError.Createfmt('File "%s" already exists.',[AFileName]);
|
||||
end;
|
||||
RealFile:=TFileStream.Create(AFileName,fmCreate);
|
||||
|
Reference in New Issue
Block a user