mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 16:40:48 +02:00
if revision.inc does not exist, make sure the directory is writable before proceeding
git-svn-id: trunk@9003 -
This commit is contained in:
parent
bfaaefd126
commit
e7bdea71ee
@ -51,6 +51,7 @@ uses
|
|||||||
var
|
var
|
||||||
SourceDirectory,
|
SourceDirectory,
|
||||||
RevisionIncFileName: string;
|
RevisionIncFileName: string;
|
||||||
|
RevisionIncDirName: string;
|
||||||
RevisionStr: string = 'Unknown';
|
RevisionStr: string = 'Unknown';
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -148,8 +149,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function ParamsValid: boolean;
|
function ParamsValid: boolean;
|
||||||
var
|
|
||||||
RevisionIncDirName: string;
|
|
||||||
begin
|
begin
|
||||||
Result := false;
|
Result := false;
|
||||||
if ParamCount<>2 then exit;
|
if ParamCount<>2 then exit;
|
||||||
@ -169,8 +168,10 @@ end;
|
|||||||
|
|
||||||
function CanCreateRevisionInc: boolean;
|
function CanCreateRevisionInc: boolean;
|
||||||
begin
|
begin
|
||||||
Result:=(not FileExists(RevisionIncFileName))
|
if (FileExists(RevisionIncFileName)) then
|
||||||
or FileIsWritable(RevisionIncFileName);
|
Result:= FileIsWritable(RevisionIncFileName)
|
||||||
|
else
|
||||||
|
Result := DirectoryIsWritable(RevisionIncDirName);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user