Bug report #6193

Can't load layers from a zip a 2nd time, after it is modified (need to restart QGIS)

Added by Alister Hood about 12 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Vectors
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:15507

Description

Attached is a small example zip.
Don't extract it - use the new ability in QGIS (since 1.8) to load the shp layers from inside the zip. Yes, the layers are empty ;)
Click "File>New Project".
Open the zip file in your favourite zip software, and delete the xml files (they are some sort of ESRI metadata file).
Try to load the layers from the zip file again - you will get an (incorrect) error message for each layer that it "is not a valid or recognized data source".
Restart QGIS and you will be able to load the layers successfully.

I guess this is caused by some sort of caching that is going on. But is it a QGIS problem, or an upstream problem?

I have only tested with master and in Windows so far.
A likely "use case" is when a website allows a user to select some layers and geographic area and download a zip of the data. They may then decide to add more layers or increase the area and download a new zip, replacing the old one. Unless they restart QGIS before loading layers from the new zip, they will get the incorrect error message, and be confused, perhaps thinking that the second download is corrupt.

Copy_of_AC_GIS_Data_13_8_2012.zip (10.3 KB) Alister Hood, 2012-08-15 07:08 PM

History

#1 Updated by Alister Hood about 12 years ago

Sorry, I forgot the attachment, and then the server went offline :(

#2 Updated by Giovanni Manghi about 12 years ago

  • Category set to Vectors
  • Target version set to Version 2.0.0

A likely "use case" is when a website allows a user to select some layers and geographic area and download a zip of the data. They may then decide to add more layers or increase the area and download a new zip, replacing the old one. Unless they restart QGIS before loading layers from the new zip, they will get the incorrect error message, and be confused, perhaps thinking that the second download is corrupt.

what is the chance for this happen? :) Anyway I guess that this would be better to be fixed, but not really sure this is a qgis issue.

#3 Updated by Alister Hood about 12 years ago

Giovanni Manghi wrote:

what is the chance for this happen? :)

Well, I encountered it the first time I used layers from a zip in real life :)

#4 Updated by Alister Hood about 12 years ago

I forgot to say: I've now tested and the problem is the same on Linux.

#5 Updated by Jürgen Fischer over 10 years ago

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

#6 Updated by Giovanni Manghi over 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#7 Updated by Giovanni Manghi over 5 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF