diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-02-24 12:42:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-24 12:42:36 +0100 |
| commit | c7c06c1b2aae31825b4b84ec2be3eeb1ca53a03e (patch) | |
| tree | 84d8bf3644da6398cd0abeed0a5435f9863d727c /src/filemanager.cpp | |
| parent | 595686c3235a0c9a7fb05e3f4927a569963fcbc6 (diff) | |
| parent | 9f1afa969a3a18bd2b8298968799c206c63d2a19 (diff) | |
| download | PROJ-c7c06c1b2aae31825b4b84ec2be3eeb1ca53a03e.tar.gz PROJ-c7c06c1b2aae31825b4b84ec2be3eeb1ca53a03e.zip | |
Merge pull request #1972 from PROJ-BOT/backport-1967-to-7.0
[Backport 7.0] Expose proj_context_is_network_enabled() in C API
Diffstat (limited to 'src/filemanager.cpp')
| -rw-r--r-- | src/filemanager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/filemanager.cpp b/src/filemanager.cpp index 165a5b15..d7c55fba 100644 --- a/src/filemanager.cpp +++ b/src/filemanager.cpp @@ -944,7 +944,7 @@ std::unique_ptr<File> FileApiAdapter::open(PJ_CONTEXT *ctx, std::unique_ptr<File> FileManager::open(PJ_CONTEXT *ctx, const char *filename, FileAccess access) { if (starts_with(filename, "http://") || starts_with(filename, "https://")) { - if (!pj_context_is_network_enabled(ctx)) { + if (!proj_context_is_network_enabled(ctx)) { pj_log( ctx, PJ_LOG_ERROR, "Attempt at accessing remote resource not authorized. Either " @@ -1672,7 +1672,8 @@ NS_PROJ::FileManager::open_resource_file(projCtx ctx, const char *name) { if (file == nullptr && !is_tilde_slash(name) && !is_rel_or_absolute_filename(name) && !starts_with(name, "http://") && - !starts_with(name, "https://") && pj_context_is_network_enabled(ctx)) { + !starts_with(name, "https://") && + proj_context_is_network_enabled(ctx)) { std::string remote_file(pj_context_get_url_endpoint(ctx)); if (!remote_file.empty()) { if (remote_file.back() != '/') { |
