Skip to content

Commit 034a800

Browse files
committed
Setting the PythonHome as the currenct dir - it fixes a bug with access permission with ensurepip on cp311
Former-commit-id: 216ebd79fecedb9ddad628033734f09949105a01 [formerly 6d93f204c6296a3e56f00f70479ed3b0a9c17f01] [formerly 01830309020e345dd7a29af2fb1a0026582023cd [formerly 2955e80a1aca69372f5e88f273d7b9e39ca8d974]] [formerly 3a47483b4f8b18cbcd9011d836634d6fdd55ef40 [formerly 801951e83a356690ff10163475272b5165ef761e] [formerly 59528cefb5ba296cf3d810cc42bf78511a91eba4 [formerly 6889c2cc535935b0db2a62d0dd7c3887ee6de77f]]] Former-commit-id: 5a6768cfddbfa1d1114ae173704ab4e9ddad5962 [formerly d2dab1fefa83047b3fa470ca02215f6ae0c1eee1] [formerly 114e1008dd621c7e6080f87e80ab405960e9f05c [formerly a9456e8bd4af38918b847459448383fdf6a81af5]] Former-commit-id: 448a1bfb3ec41e7d666ba077b75e0ddfe12cfcf4 [formerly 39551a6c709e10a187353985068fb2f5f1eac88c] Former-commit-id: 24ee380332ab928014a8489194986be324711a6d
1 parent 98cd482 commit 034a800

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/PyEnvironment.pas

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,11 @@ function TPyCustomEnvironment.InternalActivate(const APythonVersion: string;
676676
DoInternalError();
677677
end;
678678

679+
// Set the current path to the one we have rw permission
680+
{$IFDEF ANDROID}
681+
SetCurrentDir(FPythonEngine.PythonHome);
682+
{$ENDIF ANDROID}
683+
679684
DoAfterActivate(APythonVersion, LDistribution, Result, ACancelation);
680685

681686
try

0 commit comments

Comments
 (0)