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
440
440
DLLFileName: string;
441
441
begin
442
442
Result := ' ' ;
443
- Handle := FindFirstFile(PWideChar(APath+' \python?? .dll' ), FindFileData);
443
+ Handle := FindFirstFile(PWideChar(APath+' \python* .dll' ), FindFileData);
444
444
if Handle = INVALID_HANDLE_VALUE then Exit; // not python dll
445
445
DLLFileName:= FindFileData.cFileName;
446
446
// skip if python3.dll was found
447
- if Length(DLLFileName) <> 12 then FindNextFile(Handle, FindFileData);
447
+ if Length(DLLFileName) <= 11 then FindNextFile(Handle, FindFileData);
448
448
if Handle = INVALID_HANDLE_VALUE then Exit;
449
449
Windows.FindClose(Handle);
450
450
DLLFileName:= FindFileData.cFileName;
451
- if Length(DLLFileName) = 12 then
451
+ if Length(DLLFileName) > 11 then
452
452
Result := DLLFileName;
453
453
end ;
454
454
You can’t perform that action at this time.
0 commit comments