mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 06:39:12 +02:00
LazUtils: Make ForceDirectoriesUTF8 more readable.
git-svn-id: trunk@37108 -
This commit is contained in:
parent
6d77dc76e7
commit
afcd11631a
@ -1578,9 +1578,11 @@ function ForceDirectoriesUTF8(const Dir: string): Boolean;
|
|||||||
APath := ExtractFilePath(ADir);
|
APath := ExtractFilePath(ADir);
|
||||||
//this can happen on Windows if user specifies Dir like \user\name/test/
|
//this can happen on Windows if user specifies Dir like \user\name/test/
|
||||||
//and would, if not checked for, cause an infinite recusrsion and a stack overflow
|
//and would, if not checked for, cause an infinite recusrsion and a stack overflow
|
||||||
if (APath = ADir) then Result := False
|
if (APath = ADir) then
|
||||||
else Result:=DoForceDirectories(APath);
|
Result := False
|
||||||
If Result then
|
else
|
||||||
|
Result:=DoForceDirectories(APath);
|
||||||
|
if Result then
|
||||||
Result := CreateDirUTF8(ADir);
|
Result := CreateDirUTF8(ADir);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user