Feature request #17032

delete (or propose to) all files of a shapefile with browser

Added by Loïc BARTOLETTI almost 3 years ago. Updated over 1 year ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Browser
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:24931

Description

Hello,

When you delete a shapefile in browser not all files are removed:
.cpg stay (an optional file to .dbf)
.idx (an alternative index from AutoCad Map and other)

It would be nice to have a list of the files remaining with the same name (and to be able to delete them by selecting them if you wish)


Related issues

Related to QGIS Application - Bug report #21495: Deleting shapefiles from the browser panel does not delet... Closed 2019-03-06

History

#1 Updated by Alessandro Pasotti almost 3 years ago

I think this is an upstream OGR/GDAL bug: I'm using GDAL/OGR API do delete the layers.

See: https://github.com/qgis/QGIS/blob/master/src/providers/ogr/qgsogrprovider.cpp#L4331

#2 Updated by Giovanni Manghi almost 3 years ago

  • Status changed from Open to Closed
  • Resolution set to up/downstream

#3 Updated by Loïc BARTOLETTI almost 3 years ago

Alessandro Pasotti wrote:

I think this is an upstream OGR/GDAL bug: I'm using GDAL/OGR API do delete the layers.

See: https://github.com/qgis/QGIS/blob/master/src/providers/ogr/qgsogrprovider.cpp#L4331

OK, I understand that is not a problem with QGis but with GDAL/OGR API, and so it's not a bug but for an end user, the folder it's not cleaned.

So, what about to have a feature to answer some (maybe bad...) usages? I have exposed a simple case, but also you can have user which using the same name of a layer and want also remove (or rename) it like a .pdf or .txt...

Thanks.

#4 Updated by Loïc BARTOLETTI almost 3 years ago

  • Status changed from Closed to Reopened

#5 Updated by Giovanni Manghi almost 3 years ago

  • Status changed from Reopened to Feedback

Why reopened? If there is a good reason this should be left here, and the resolution field changed.

#6 Updated by Loïc BARTOLETTI almost 3 years ago

Sorry, I did not see that my message was not added, my bad.

I reopened the subject because I posted a message after its closure and I think that even if it is not a bug of QGis, the users can hope for a "complete" cleaning of files (it is the same thing for a renaming). It would be nice to indicate to the user that files having the same name were not deleted and to propose its deletion (the same for renaming).

If you prefer, we change a bug report to a feature request.

#7 Updated by Giovanni Manghi almost 3 years ago

  • Status changed from Feedback to Open
  • Tracker changed from Bug report to Feature request
  • Subject changed from delete shapefile in browser to delete (or propose to) all files of a shapefile with browser
  • Resolution deleted (up/downstream)

#8 Updated by Frank Sokolic over 2 years ago

.qpj files are not deleted either. Deleting these files could also be part of the feature request.

#9 Updated by Andrea Giudiceandrea over 1 year ago

  • Related to Bug report #21495: Deleting shapefiles from the browser panel does not delete all the files added

#10 Updated by Nyall Dawson over 1 year ago

  • Status changed from Open to Closed

Fixed in gdal

Also available in: Atom PDF