Bug report #19893
It's not possible to delete raster layers in geopackages on Windows
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Alessandro Pasotti | ||
Category: | Browser | ||
Affected QGIS version: | 3.3(master) | Regression?: | No |
Operating System: | Windows 7 | Easy fix?: | No |
Pull Request or Patch supplied: | Yes | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 27717 |
Description
It seems not possible to delete raster layers stored in geopackages on Windows from the "Browser" panel with QGIS 3.3.0-master (d99d506e75): a warning message box pops up with the text "Layer URI is malformed: layer [layer URI] cannot be deleted!".
I guess the problem is in https://github.com/qgis/QGIS/blob/master/src/providers/ogr/qgsgeopackagedataitems.cpp#L360-L364
QStringList pieces( uri.split( ':' ) );
if ( pieces.size() != 3 )
{
errCause = QStringLiteral( "Layer URI is malformed: layer <b>%1</b> cannot be deleted!" ).arg( uri );
}
In fact a typical geopackage Layer URI on Windows is GPKG:C:/some/path/geopackage_name.gpkg:layer_name so pieces.size() is always 4 on Windows.
Related issues
Associated revisions
History
#1 Updated by Jérôme Guélat about 6 years ago
See also #17967
#2 Updated by Alessandro Pasotti about 6 years ago
- Assignee set to Alessandro Pasotti
#3 Updated by Jürgen Fischer about 6 years ago
- Related to Bug report #17967: Browser: deleting raster in GeoPackage doesn't work added
#4 Updated by Alessandro Pasotti about 6 years ago
- Status changed from Open to In Progress
- Pull Request or Patch supplied changed from No to Yes
#5 Updated by Anonymous about 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
Applied in changeset qgis|e62c4eb941c5b2e290675f8cab75758857c2a502.
#6 Updated by Alessandro Pasotti about 6 years ago
- Resolution set to fixed/implemented