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"/>
|
<UseExternalDbgSyms Value="True"/>
|
||||||
</Debugging>
|
</Debugging>
|
||||||
</Linking>
|
</Linking>
|
||||||
|
<Other>
|
||||||
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
</Item2>
|
</Item2>
|
||||||
<Item3 Name="Release">
|
<Item3 Name="Release">
|
||||||
@ -71,6 +74,9 @@
|
|||||||
</Debugging>
|
</Debugging>
|
||||||
<LinkSmart Value="True"/>
|
<LinkSmart Value="True"/>
|
||||||
</Linking>
|
</Linking>
|
||||||
|
<Other>
|
||||||
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
</Item3>
|
</Item3>
|
||||||
</BuildModes>
|
</BuildModes>
|
||||||
@ -115,5 +121,8 @@
|
|||||||
<DebugInfoType Value="dsDwarf2Set"/>
|
<DebugInfoType Value="dsDwarf2Set"/>
|
||||||
</Debugging>
|
</Debugging>
|
||||||
</Linking>
|
</Linking>
|
||||||
|
<Other>
|
||||||
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
</CONFIG>
|
</CONFIG>
|
||||||
|
@ -57,7 +57,12 @@ var
|
|||||||
tmpStream: TStream; // workaround to a compiler bug, see bug 22370
|
tmpStream: TStream; // workaround to a compiler bug, see bug 22370
|
||||||
begin
|
begin
|
||||||
VLAbsolutePath:='/'+AStreamName; //Virtual layer always use absolute paths.
|
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]);
|
Raise EStreamError.Createfmt('File "%s" already exists.',[AFileName]);
|
||||||
end;
|
end;
|
||||||
RealFile:=TFileStream.Create(AFileName,fmCreate);
|
RealFile:=TFileStream.Create(AFileName,fmCreate);
|
||||||
|
@ -14,6 +14,9 @@ unit fpspreadsheet;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
{$IFDEF UNIX}
|
||||||
|
clocale,
|
||||||
|
{$ENDIF}
|
||||||
Classes, SysUtils, fpimage, AVL_Tree, avglvltree, lconvencoding;
|
Classes, SysUtils, fpimage, AVL_Tree, avglvltree, lconvencoding;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -1094,9 +1097,6 @@ procedure InitCell(var ACell: TCell);
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF UNIX}
|
|
||||||
clocale,
|
|
||||||
{$ENDIF}
|
|
||||||
Math, StrUtils, TypInfo, fpsStreams, fpsUtils, fpsNumFormatParser, fpsFunc;
|
Math, StrUtils, TypInfo, fpsStreams, fpsUtils, fpsNumFormatParser, fpsFunc;
|
||||||
|
|
||||||
{ Translatable strings }
|
{ Translatable strings }
|
||||||
|
Reference in New Issue
Block a user