Skip to content
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

QgsRasterFileWriter::driverForExtension(): make sure querying the tif… #59122

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

rouault
Copy link
Contributor

@rouault rouault commented Oct 17, 2024

…/tiff extension returns the GTiff driver

Not strictly necessary since has been adressed on GDAL side per OSGeo/gdal#11037 but might be prudent for future similar situations.

Fixes #59112

Already tested per

self.assertEqual(QgsRasterFileWriter.driverForExtension('tif'), 'GTiff')

@github-actions github-actions bot added this to the 3.40.0 milestone Oct 17, 2024
rouault added a commit to rouault/QGIS that referenced this pull request Oct 17, 2024
…/tiff extension returns the GTiff driver

Not strictly necessary since has been adressed on GDAL side per OSGeo/gdal#11037
but might be prudent for future similar situations.

Fixes qgis#59122
@rouault rouault force-pushed the fix_59112 branch 2 times, most recently from 6f68fc6 to 796054f Compare October 17, 2024 19:42
Copy link

github-actions bot commented Oct 17, 2024

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 8dd5ccb)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 8dd5ccb)

@@ -1072,6 +1072,15 @@ QString QgsRasterFileWriter::driverForExtension( const QString &extension )
if ( ext.startsWith( '.' ) )
ext.remove( 0, 1 );

if ( ext == QLatin1String( "tif" ) || ext == QLatin1String( "tiff" ) )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the comparison be case insensitive?

Copy link
Contributor Author

@rouault rouault Oct 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed. Fixed. Thanks for the review

…/tiff extension returns the GTiff driver

Not strictly necessary since has been adressed on GDAL side per OSGeo/gdal#11037
but might be prudent for future similar situations.

Fixes qgis#59112
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QGIS 3.39 tries to create files with SNAP_TIFF read-only driver
4 participants