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;
|
||||
procedure GetFileOwnerData(const SearchDomain, FileName:String;out UserName, DomainName:string);
|
||||
function NormalizeDirectoryName(const DirName:string):string;
|
||||
implementation
|
||||
uses
|
||||
{$IFDEF WINDOWS}
|
||||
@ -127,5 +128,16 @@ begin
|
||||
{$ENDIF}
|
||||
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.
|
||||
|
||||
|
Reference in New Issue
Block a user