You've already forked lazarus-ccr
new function - NormalizeDirectoryName
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1150 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -9,6 +9,7 @@ uses
|
|||||||
|
|
||||||
function GetFileOwnerUser(const SearchDomain, FileName:String):String;
|
function GetFileOwnerUser(const SearchDomain, FileName:String):String;
|
||||||
procedure GetFileOwnerData(const SearchDomain, FileName:String;out UserName, DomainName:string);
|
procedure GetFileOwnerData(const SearchDomain, FileName:String;out UserName, DomainName:string);
|
||||||
|
function NormalizeDirectoryName(const DirName:string):string;
|
||||||
implementation
|
implementation
|
||||||
uses
|
uses
|
||||||
{$IFDEF WINDOWS}
|
{$IFDEF WINDOWS}
|
||||||
@ -127,5 +128,16 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{replase any dir separators '\' or '/' to system directory separator }
|
||||||
|
function NormalizeDirectoryName(const DirName: string): string;
|
||||||
|
var
|
||||||
|
i:integer;
|
||||||
|
begin
|
||||||
|
Result:=DirName;
|
||||||
|
for i:=1 to Length(Result) do
|
||||||
|
if Result[i] in ['/', '\'] then
|
||||||
|
Result[i]:=DirectorySeparator;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user