mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix for ticket #890 "python plugin installer unzip fails"
git-svn-id: http://svn.osgeo.org/qgis/trunk@7859 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
516e6a5dd7
commit
0a2a4b1a19
@ -86,6 +86,15 @@ class unzip:
|
||||
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user