diff options
| author | Alan D. Snow <alansnow21@gmail.com> | 2020-04-20 03:03:41 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-20 10:03:41 +0200 |
| commit | 5e3aba396b114fa4bb3cd787acfc000f6792c078 (patch) | |
| tree | 8bb11317ded5f9b9ed62ccf0cdfc31f711213ae7 /src/networkfilemanager.cpp | |
| parent | b16b966b7484efd74a7364bd455ed3015d1009d6 (diff) | |
| download | PROJ-5e3aba396b114fa4bb3cd787acfc000f6792c078.tar.gz PROJ-5e3aba396b114fa4bb3cd787acfc000f6792c078.zip | |
Moved proj_context_get_url_endpoint & proj_context_get_user_writable_directory to proj.h (#2162)
Fixes #2028
Diffstat (limited to 'src/networkfilemanager.cpp')
| -rw-r--r-- | src/networkfilemanager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/networkfilemanager.cpp b/src/networkfilemanager.cpp index 28d8baa2..7cc0599e 100644 --- a/src/networkfilemanager.cpp +++ b/src/networkfilemanager.cpp @@ -1947,7 +1947,7 @@ static bool is_rel_or_absolute_filename(const char *name) { static std::string build_url(PJ_CONTEXT *ctx, const char *name) { if (!is_tilde_slash(name) && !is_rel_or_absolute_filename(name) && !starts_with(name, "http://") && !starts_with(name, "https://")) { - std::string remote_file(pj_context_get_url_endpoint(ctx)); + std::string remote_file(proj_context_get_url_endpoint(ctx)); if (!remote_file.empty()) { if (remote_file.back() != '/') { remote_file += '/'; @@ -2213,7 +2213,7 @@ int proj_is_download_needed(PJ_CONTEXT *ctx, const char *url_or_filename, if (filename == nullptr) return false; const auto localFilename( - pj_context_get_user_writable_directory(ctx, false) + filename); + std::string(proj_context_get_user_writable_directory(ctx, false)) + filename); auto f = NS_PROJ::FileManager::open(ctx, localFilename.c_str(), NS_PROJ::FileAccess::READ_ONLY); @@ -2351,7 +2351,7 @@ int proj_download_file(PJ_CONTEXT *ctx, const char *url_or_filename, const char *filename = strrchr(url.c_str(), '/'); if (filename == nullptr) return false; - const auto localFilename(pj_context_get_user_writable_directory(ctx, true) + + const auto localFilename(std::string(proj_context_get_user_writable_directory(ctx, true)) + filename); #ifdef _WIN32 @@ -2536,7 +2536,7 @@ std::string pj_context_get_grid_cache_filename(PJ_CONTEXT *ctx) { if (!ctx->gridChunkCache.filename.empty()) { return ctx->gridChunkCache.filename; } - const std::string path(pj_context_get_user_writable_directory(ctx, true)); + const std::string path(proj_context_get_user_writable_directory(ctx, true)); ctx->gridChunkCache.filename = path + "/cache.db"; return ctx->gridChunkCache.filename; } |
