File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -440,15 +440,15 @@ function PythonVersionFromPath(const Path: string; out PythonVersion: TPythonVer
440440 DLLFileName: string;
441441 begin
442442 Result := ' ' ;
443- Handle := FindFirstFile(PWideChar(APath+' \python?? .dll' ), FindFileData);
443+ Handle := FindFirstFile(PWideChar(APath+' \python* .dll' ), FindFileData);
444444 if Handle = INVALID_HANDLE_VALUE then Exit; // not python dll
445445 DLLFileName:= FindFileData.cFileName;
446446 // skip if python3.dll was found
447- if Length(DLLFileName) <> 12 then FindNextFile(Handle, FindFileData);
447+ if Length(DLLFileName) <= 11 then FindNextFile(Handle, FindFileData);
448448 if Handle = INVALID_HANDLE_VALUE then Exit;
449449 Windows.FindClose(Handle);
450450 DLLFileName:= FindFileData.cFileName;
451- if Length(DLLFileName) = 12 then
451+ if Length(DLLFileName) > 11 then
452452 Result := DLLFileName;
453453 end ;
454454
You can’t perform that action at this time.
0 commit comments