# HG changeset patch # User vimboss # Date 1227175493 0 # Node ID 06317850ad3acd03765fc0f8002f17417773d906 # Parent 95dd473d2d28a088822c73309c3dee597c96facd updated for version 7.2-045 diff --git a/src/if_python.c b/src/if_python.c --- a/src/if_python.c +++ b/src/if_python.c @@ -531,6 +531,12 @@ Python_Init(void) if (PythonMod_Init()) goto fail; + /* Remove the element from sys.path that was added because of our + * argv[0] value in PythonMod_Init(). Previously we used an empty + * string, but dependinding on the OS we then get an empty entry or + * the current directory in sys.path. */ + PyRun_SimpleString("import sys; sys.path = filter(lambda x: x != '/must>not&exist', sys.path)"); + /* the first python thread is vim's, release the lock */ Python_SaveThread(); @@ -2345,7 +2351,8 @@ PythonMod_Init(void) { PyObject *mod; PyObject *dict; - static char *(argv[2]) = {"", NULL}; + /* The special value is removed from sys.path in Python_Init(). */ + static char *(argv[2]) = {"/must>not&exist/foo", NULL}; /* Fixups... */ BufferType.ob_type = &PyType_Type; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -677,6 +677,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 45, +/**/ 44, /**/ 43,