diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-01-20 23:45:19 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-01-20 23:45:19 +0100 |
| commit | c4191f3057ef89fb00df31cca23a6093f8f399cb (patch) | |
| tree | 4c2d89c70fd537dda397bf4be7655e65619340d2 /src/filemanager.cpp | |
| parent | 9bb87ea4782b6005848afde29db9751e05ee0e55 (diff) | |
| download | PROJ-c4191f3057ef89fb00df31cca23a6093f8f399cb.tar.gz PROJ-c4191f3057ef89fb00df31cca23a6093f8f399cb.zip | |
Address @hobu 's review comment of https://github.com/OSGeo/PROJ/pull/1839#pullrequestreview-345535380
Diffstat (limited to 'src/filemanager.cpp')
| -rw-r--r-- | src/filemanager.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/filemanager.cpp b/src/filemanager.cpp index 0763181b..005e734b 100644 --- a/src/filemanager.cpp +++ b/src/filemanager.cpp @@ -1258,13 +1258,11 @@ static const char *proj_lib_name = nullptr; #endif -static bool ignoreUserWritableDirectory() { +static bool dontReadUserWritableDirectory() { // Env var mostly for testing purposes and being independent from // an existing installation - const char *envVarIgnoreUserWritableDirectory = - getenv("PROJ_IGNORE_USER_WRITABLE_DIRECTORY"); - return envVarIgnoreUserWritableDirectory != nullptr && - envVarIgnoreUserWritableDirectory[0] != '\0'; + const char *envVar = getenv("PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY"); + return envVar != nullptr && envVar[0] != '\0'; } static void * @@ -1336,7 +1334,7 @@ pj_open_lib_internal(projCtx ctx, const char *name, const char *mode, } } - else if (!ignoreUserWritableDirectory() && + else if (!dontReadUserWritableDirectory() && (fid = open_file( ctx, (pj_context_get_user_writable_directory(ctx, false) + DIR_CHAR + name) |
