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:
@ -44,6 +44,9 @@
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
<Item3 Name="Release">
|
||||
@ -71,6 +74,9 @@
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item3>
|
||||
</BuildModes>
|
||||
@ -115,5 +121,8 @@
|
||||
<DebugInfoType Value="dsDwarf2Set"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
||||
|
@ -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);
|
||||
|
@ -14,6 +14,9 @@ unit fpspreadsheet;
|
||||
interface
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}
|
||||
clocale,
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, fpimage, AVL_Tree, avglvltree, lconvencoding;
|
||||
|
||||
type
|
||||
@ -1094,9 +1097,6 @@ procedure InitCell(var ACell: TCell);
|
||||
implementation
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}
|
||||
clocale,
|
||||
{$ENDIF}
|
||||
Math, StrUtils, TypInfo, fpsStreams, fpsUtils, fpsNumFormatParser, fpsFunc;
|
||||
|
||||
{ Translatable strings }
|
||||
|
Reference in New Issue
Block a user