mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where pgadmin cannot install into path with non ASCII characters. #5204
This commit is contained in:
@@ -145,36 +145,6 @@ begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function IsPathValid(Path: string): Boolean;
|
||||
var
|
||||
I: Integer;
|
||||
Ret: Boolean;
|
||||
begin
|
||||
Ret := True;
|
||||
Path := Uppercase(Path);
|
||||
Result :=
|
||||
(Length(Path) >= 3) and
|
||||
(Path[1] >= 'A') and (Path[1] <= 'Z') and
|
||||
(Path[2] = ':') and
|
||||
(Path[3] = '\');
|
||||
|
||||
if Result then
|
||||
begin
|
||||
for I := 3 to Length(Path) do
|
||||
begin
|
||||
case Path[I] of
|
||||
'0'..'9', 'A'..'Z', '\', ' ', '.', '-', '_', '(', ')':
|
||||
else
|
||||
begin
|
||||
Ret := False;
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
Result := Ret;
|
||||
end;
|
||||
|
||||
function CheckPgAdminAlreadyInstalled: Boolean;
|
||||
var
|
||||
Version: String;
|
||||
|
Reference in New Issue
Block a user