mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 22:49:30 +02:00
IDE: renamed BackupFile to BackupFileForWrite for less ambiguity
git-svn-id: trunk@51366 -
This commit is contained in:
parent
844a4bf826
commit
38c894449e
@ -79,7 +79,7 @@ type
|
||||
): TModalResult; virtual; abstract;
|
||||
function CreateProjectApplicationBundle: Boolean; virtual; abstract;
|
||||
|
||||
function BackupFile(const Filename: string): TModalResult; virtual; abstract;
|
||||
function BackupFileForWrite(const Filename: string): TModalResult; virtual; abstract;
|
||||
|
||||
function UpdateProjectAutomaticFiles(TestDir: string): TModalResult; virtual; abstract;
|
||||
end;
|
||||
|
@ -214,7 +214,7 @@ type
|
||||
CompiledExt, ContextDescription: string
|
||||
): TModalResult; override;
|
||||
function CreateProjectApplicationBundle: Boolean; override;
|
||||
function BackupFile(const Filename: string): TModalResult; override;
|
||||
function BackupFileForWrite(const Filename: string): TModalResult; override;
|
||||
|
||||
function GetResourceType(AnUnitInfo: TUnitInfo): TResourceType;
|
||||
function FindLRSFilename(AnUnitInfo: TUnitInfo;
|
||||
@ -328,7 +328,7 @@ begin
|
||||
fLCLWidgetType:=LCLPlatformDirNames[GetDefaultLCLWidgetType];
|
||||
FUnitSetChangeStamp:=TFPCUnitSetCache.GetInvalidChangeStamp;
|
||||
|
||||
OnBackupFileInteractive:=@BackupFile;
|
||||
OnBackupFileInteractive:=@BackupFileForWrite;
|
||||
|
||||
GetBuildMacroValues:=@OnGetBuildMacroValues;
|
||||
OnAppendCustomOption:=@AppendMatrixCustomOption;
|
||||
@ -1474,7 +1474,7 @@ begin
|
||||
if not (Result in [mrOK,mrIgnore]) then exit(mrCancel);
|
||||
end else if EnvironmentOptions.AmbiguousFileAction=afaAutoRename then
|
||||
begin
|
||||
Result:=BackupFile(CurFilename);
|
||||
Result:=BackupFileForWrite(CurFilename);
|
||||
if not (Result in [mrOK,mrIgnore]) then exit(mrCancel);
|
||||
if FileExistsUTF8(CurFilename) then begin
|
||||
Result:=DeleteFileInteractive(CurFilename);
|
||||
@ -1625,7 +1625,7 @@ begin
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function TBuildManager.BackupFile(const Filename: string): TModalResult;
|
||||
function TBuildManager.BackupFileForWrite(const Filename: string): TModalResult;
|
||||
var BackupFilename, CounterFilename: string;
|
||||
AText,ACaption:string;
|
||||
BackupInfo: TBackupInfo;
|
||||
@ -1752,7 +1752,7 @@ begin
|
||||
end;
|
||||
// backup file
|
||||
repeat
|
||||
if not IDEProcs.BackupFile(Filename, BackupFilename) then
|
||||
if not IDEProcs.BackupFileForWrite(Filename, BackupFilename) then
|
||||
begin
|
||||
ACaption := lisBackupFileFailed;
|
||||
AText := Format(lisUnableToBackupFileTo, [Filename, BackupFilename]);
|
||||
|
@ -76,7 +76,7 @@ type
|
||||
Data: TObject) of object;
|
||||
|
||||
// file operations
|
||||
function BackupFile(const Filename, BackupFilename: string): boolean;
|
||||
function BackupFileForWrite(const Filename, BackupFilename: string): boolean;
|
||||
function ClearFile(const Filename: string; RaiseOnError: boolean): boolean;
|
||||
function CreateEmptyFile(const Filename: string): boolean;
|
||||
function CopyFileWithMethods(const SrcFilename, DestFilename: string;
|
||||
@ -1401,7 +1401,7 @@ begin
|
||||
end;
|
||||
|
||||
{-------------------------------------------------------------------------------
|
||||
BackupFile
|
||||
BackupFileForWrite
|
||||
|
||||
Params: const Filename, BackupFilename: string
|
||||
Result: boolean
|
||||
@ -1409,7 +1409,7 @@ end;
|
||||
Rename Filename to Backupfilename and create empty Filename with same
|
||||
file attributes
|
||||
-------------------------------------------------------------------------------}
|
||||
function BackupFile(const Filename, BackupFilename: string): boolean;
|
||||
function BackupFileForWrite(const Filename, BackupFilename: string): boolean;
|
||||
|
||||
function FileIsLocked(const {%H-}FileName: String): Boolean;
|
||||
{$ifdef Windows}
|
||||
|
@ -57,6 +57,7 @@
|
||||
<Unit2>
|
||||
<Filename Value="basebuildmanager.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="BaseBuildManager"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="idecmdline.pas"/>
|
||||
|
@ -995,7 +995,7 @@ begin
|
||||
Result.EndUpdate;
|
||||
|
||||
Result.MainProject:=true;
|
||||
Result.OnFileBackup:=@BuildBoss.BackupFile;
|
||||
Result.OnFileBackup:=@BuildBoss.BackupFileForWrite;
|
||||
Result.OnChangeProjectInfoFile:=@OnProjectChangeInfoFile;
|
||||
|
||||
finally
|
||||
|
@ -6063,7 +6063,6 @@ begin
|
||||
Result.EndUpdate;
|
||||
|
||||
Result.MainProject:=true;
|
||||
Result.OnFileBackup:=@MainBuildBoss.BackupFile;
|
||||
Result.OnLoadProjectInfo:=@OnLoadProjectInfoFromXMLConfig;
|
||||
Result.OnSaveProjectInfo:=@OnSaveProjectInfoToXMLConfig;
|
||||
Result.OnSaveUnitSessionInfo:=@OnSaveProjectUnitSessionInfo;
|
||||
|
@ -3752,7 +3752,7 @@ begin
|
||||
end;
|
||||
|
||||
// backup old file
|
||||
Result:=BuildBoss.BackupFile(APackage.Filename);
|
||||
Result:=BuildBoss.BackupFileForWrite(APackage.Filename);
|
||||
if Result=mrAbort then exit;
|
||||
|
||||
// delete ambiguous files
|
||||
|
Loading…
Reference in New Issue
Block a user