forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from OSGeo:master #160
Merged
Merged
+4,173
−3,397
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…etExtensionSafe()
…), CPLGetExtensionSafe()
…t semantic change in Rename() where case-sensitive find() used instead of ifind(), change which is more logical
…,' with 'poOpenInfo->IsExtensionEqualToCI('
…ExtensionSafe(...).c_str(), ...) Using ``` find frmts ogr -name "*.cpp" -exec sed -i "s/EQUAL(CPLGetExtension(\([a-zA-Z]*\)),/EQUAL(CPLGetExtensionSafe(\1).c_str(),/" {} \; ```
…anTrailingSlashSafe(), CPLGenerateTempFilenameSafe(), CPLExpandTildeSafe(), CPLLaunderForFilenameSafe()
…r automation scripts
Done with following script: ```bash funcs=(CPLGetPath CPLGetDirname CPLGetBasename CPLGetExtension CPLFormFilename CPLFormCIFilename CPLResetExtension CPLProjectRelativeFilename CPLCleanTrailingSlash CPLGenerateTempFilename CPLExpandTilde CPLLaunderForFilename) for func in "${funcs[@]}"; do find frmts ogr -name "*.cpp" -exec sed -i -E "s/const char \*([a-zA-Z_][a-zA-Z0-9_]*)\(${func}\(([^()]*(\([^()]*\))?[^()]*)\)\);/const char *\1 = ${func}(\2);/g" {} \; done for func in "${funcs[@]}"; do find frmts ogr -name "*.cpp" -exec sed -i -E "s/CPLString\(${func}\(([^()]*(\([^()]*\))?[^()]*)\)\)/CPLString(${func}Safe(\1))/g" {} \; find frmts ogr -name "*.cpp" -exec sed -i -E "s/std::string\(${func}\(([^()]*(\([^()]*\))?[^()]*)\)\)/std::string(${func}Safe(\1))/g" {} \; done for func in "${funcs[@]}"; do find frmts ogr -name "*.cpp" -exec sed -i -E "s/(CPLString\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\()${func}\((.*)\)/\1${func}Safe(\2)/g" {} \; find frmts ogr -name "*.cpp" -exec sed -i -E "s/(std::string\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\()${func}\((.*)\)/\1${func}Safe(\2)/g" {} \; done for func in "${funcs[@]}"; do find frmts ogr -name "*.cpp" -exec sed -i -E "s/(std::string\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\()${func}\(([^)]+)\)/\1${func}Safe(\2)/g" {} \; find frmts ogr -name "*.cpp" -exec sed -i -E "s/(CPLString\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\()${func}\(([^)]+)\)/\1${func}Safe(\2)/g" {} \; done for func in "${funcs[@]}"; do find frmts ogr -name "*.cpp" -exec sed -i -E "s/\(${func}\(([^()]*(\([^()]*\))?[^()]*)\)/(${func}Safe(\1).c_str()/g" {} \; find frmts ogr -name "*.cpp" -exec sed -i -E "s/, ${func}\(([^()]*(\([^()]*\))?[^()]*)\)/, ${func}Safe(\1).c_str()/g" {} \; done ```
Done with following script: ```bash funcs=(CPLGetPath CPLGetDirname CPLGetBasename CPLGetExtension CPLFormFilename CPLFormCIFilename CPLResetExtension CPLProjectRelativeFilename CPLCleanTrailingSlash CPLGenerateTempFilename CPLExpandTilde CPLLaunderForFilename) for func in "${funcs[@]}"; do find frmts ogr -name "*.cpp" -exec sed -i -E "s/(CPLString\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\ = )${func}\((.*)\)/\1${func}Safe(\2)/g" {} \; find frmts ogr -name "*.cpp" -exec sed -i -E "s/(std::string\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\ = )${func}\((.*)\)/\1${func}Safe(\2)/g" {} \; done ```
… CPLGetBasenameSafe()
…CPLGetDirnameSafe()
…h CPLGetExtensionSafe()
Done with following script: ```bash funcs=(CPLGetPath CPLGetDirname CPLGetBasename CPLGetExtension CPLFormFilename CPLFormCIFilename CPLResetExtension CPLProjectRelativeFilename CPLCleanTrailingSlash CPLGenerateTempFilename CPLExpandTilde CPLLaunderForFilename) for func in "${funcs[@]}"; do find frmts ogr -name "*.cpp" -exec sed -i -E "s/(CPLString\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\ = )${func}\(/\1${func}Safe(/g" {} \; find frmts ogr -name "*.cpp" -exec sed -i -E "s/(std::string\s+[a-zA-Z_][a-zA-Z0-9_]*\s*\ = )${func}\(/\1${func}Safe(/g" {} \; done ```
Done with following script: ```bash funcs=(CPLGetPath CPLGetDirname CPLGetBasename CPLGetExtension CPLFormFilename CPLFormCIFilename CPLResetExtension CPLProjectRelativeFilename CPLCleanTrailingSlash CPLGenerateTempFilename CPLExpandTilde CPLLaunderForFilename) for func in "${funcs[@]}"; do find frmts ogr -name "*.cpp" -exec sed -i -E "s/(^\s+os[a-zA-Z_][a-zA-Z0-9_]*\s*\ = )${func}(\((.*)\);)/\1${func}Safe\2/g" {} \; done ```
…ith CPLFormCIFilenameSafe()
…ith CPLResetExtensionSafe()
…ename() with CPLProjectRelativeFilenameSafe()
…me() with CPLGenerateTempFilenameSafe()
…h CPLFormFilenameSafe()
Safer CPL path functions (RFC 105 implementation)
Cf comment in last successfull build: ``` 2025-01-04T01:13:22.4654582Z /home/runner/miniconda3/envs/test/lib/python3.12/site-packages/conda_build/cli/main_build.py:520: FutureWarning: The default `pkg_format` of '.tar.bz2' is deprecated and will be removed in 25.1. 2025-01-04T01:13:22.4655579Z 2025-01-04T01:13:22.4655938Z The new default `pkg_format` value will be '.conda'. If you want to keep using `.tar.bz2`, consider: 2025-01-04T01:13:22.4656846Z - Setting `conda_build.pkg_format: 'tar.bz2' in your condarc file. 2025-01-04T01:13:22.4657562Z - Using `--pkg-format=tar.bz2` in the CLI. 2025-01-04T01:13:22.4657835Z ``` Fixes #11676
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )