functionRepairPathName(D1:String): String; var
i,p : Integer; prevCh :Char; begin
Result := d1; p := 0; prevCh := #0; for i := 1 to Length(d1) do begin inc(p); Result[p] := d1[i]; if d1[i] = '/' then Result[p] := ''; if d1[i] in ['', '/'] then if PrevCh in ['', '/'] then dec(p); PrevCh := d1[i]; end; SetLength(Result, p); end
;