Skip to content

Commit

Permalink
Fix for ticket #890 "python plugin installer unzip fails"
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7859 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman committed Jan 8, 2008
1 parent 3eefa8e commit a27dde7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python/plugins/plugin_installer/qgis_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ def _listdirs(self, file):
if name.endswith('/'):
dirs.append(name)

if len(dirs) == 0:
# this means there is no top level directory in the
# zip file. We'll assume the first entry contains the
# directory and use it
entry = zf.namelist()[0]
dir = entry.split('/')[0]
dir += '/'
dirs.append(dir)

dirs.sort()
return dirs

Expand Down

0 comments on commit a27dde7

Please sign in to comment.