More get-google-files bugfixes.
diff --git a/get-google-files b/get-google-files
index 153f9f4..fa3c561 100755
--- a/get-google-files
+++ b/get-google-files
@@ -15,7 +15,6 @@
os.makedirs("proprietary")
except:
pass
- os.chdir("proprietary")
if len(MIRRORS) > 1:
i = random.randrange(0, len(MIRRORS)-1)
else:
@@ -27,11 +26,15 @@
zip = zipfile.ZipFile(StringIO.StringIO(data),'r')
for filename in zip.namelist():
- if filename.split("/")[0] == "system":
+ if filename.split("/")[0] == "system" and filename[-1] != "/":
print "Extracting %s" % filename
try:
- zip.extract(filename)
- except:
+ bytes = zip.read(filename)
+ fd = open("proprietary/"+os.path.basename(filename),"wb")
+ fd.write(bytes)
+ fd.close()
+ except Exception, e:
+ print e
pass
def main():