diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-01-29 14:44:04 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-01-29 14:44:04 +0100 |
| commit | 9f6ab28f1d26561a547802a18b3a2f7877834ca8 (patch) | |
| tree | 53236d732f21a81e63982394d96d95d7eaa64064 /src/filemanager.cpp | |
| parent | d9ad20a959fd313b31329fb7be0500c895111edf (diff) | |
| download | PROJ-9f6ab28f1d26561a547802a18b3a2f7877834ca8.tar.gz PROJ-9f6ab28f1d26561a547802a18b3a2f7877834ca8.zip | |
Make it possible to use grids from the CDN by their 'old name' even if not in the EPSG/grid_transformation table
Diffstat (limited to 'src/filemanager.cpp')
| -rw-r--r-- | src/filemanager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/filemanager.cpp b/src/filemanager.cpp index ac753012..17e09b21 100644 --- a/src/filemanager.cpp +++ b/src/filemanager.cpp @@ -1548,6 +1548,7 @@ NS_PROJ::FileManager::open_resource_file(projCtx ctx, const char *name) { ctx, name, "rb", pj_open_file_with_manager, nullptr, 0))); // Retry with the new proj grid name if the file name doesn't end with .tif + std::string tmpString; // keep it in this upper scope ! if (file == nullptr && !is_tilde_slash(name) && !is_rel_or_absolute_filename(name) && !starts_with(name, "http://") && !starts_with(name, "https://") && strcmp(name, "proj.db") != 0 && @@ -1564,6 +1565,11 @@ NS_PROJ::FileManager::open_resource_file(projCtx ctx, const char *name) { 0))); if (file) { pj_ctx_set_errno(ctx, 0); + } else { + // For final network access attempt, use the new + // name. + tmpString = filename; + name = tmpString.c_str(); } } } catch (const std::exception &e) { |
