Skip to content

Commit a27dde7

Browse files
author
gsherman
committedJan 8, 2008

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎python/plugins/plugin_installer/qgis_plugins.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ def _listdirs(self, file):
8686
if name.endswith('/'):
8787
dirs.append(name)
8888

89+
if len(dirs) == 0:
90+
# this means there is no top level directory in the
91+
# zip file. We'll assume the first entry contains the
92+
# directory and use it
93+
entry = zf.namelist()[0]
94+
dir = entry.split('/')[0]
95+
dir += '/'
96+
dirs.append(dir)
97+
8998
dirs.sort()
9099
return dirs
91100

0 commit comments

Comments
 (0)
Please sign in to comment.