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

python plugin installer unzip fails #10949

Closed
qgib opened this issue Jan 6, 2008 · 2 comments
Closed

python plugin installer unzip fails #10949

qgib opened this issue Jan 6, 2008 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins

Comments

@qgib
Copy link
Contributor

qgib commented Jan 6, 2008

Author Name: browlingson - (browlingson -)
Original Redmine Issue: 890

Redmine category:python_plugins
Assignee: nobody -


The plugin installer downloads python plugins as a zip file. The code in qgis_plugins.py fails to unzip correctly if the top-level folder entry is not included in the zip.

It is possible to make a zip file with no top-level folder entry by doing:

zip foo.zip ./foo/*

instead of:

zip -r foo.zip ./foo

The code fails because it tries to create the directory hierarchy by looking for entries in the zip that end in '/'. If this isn't in the zip file then it then tries to extract a file to a non-existing directory, giving an error dialog that suggests (wrongly) it may be a permission problem.

Googling for python and unzip found the source of this code and some fixes in the comments.

There's a few 'try:except' clauses in the code that might be rewritten to return the exception so that a user gets more information when something fails.

Oh, and a line in installer_plugin.py that should maybe be:
plugindir = os.path.join(os.path.normpath(str(QgsApplication.qgisSettingsDirPath())), "python","plugins")

instead of concatenating path components.

@qgib
Copy link
Contributor Author

qgib commented Jan 7, 2008

Author Name: Gary Sherman (@g-sherman)


  • resolution was changed from to fixed
  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Jan 7, 2008

Author Name: Gary Sherman (@g-sherman)


Fixed at

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins labels May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins
Projects
None yet
Development

No branches or pull requests

1 participant