configurationengine/source/plugins/symbian/ConeThemePlugin/themeplugin/unzip.py
changeset 9 63964d875993
parent 5 d2c80f5cab53
--- a/configurationengine/source/plugins/symbian/ConeThemePlugin/themeplugin/unzip.py	Tue Oct 26 10:43:50 2010 +0100
+++ b/configurationengine/source/plugins/symbian/ConeThemePlugin/themeplugin/unzip.py	Sat Nov 06 16:59:14 2010 +0200
@@ -22,17 +22,19 @@
     
     if (os.path.exists(dir) is not True):
         os.mkdir(dir, 0777)
-        
     zfobj = zipfile.ZipFile(file)
     for name in zfobj.namelist():
         filePath = dir + name
         if name.endswith('/'):
-            os.mkdir(filePath)
+            if not os.path.exists(filePath):
+                createEmtyResource(filePath)
+                #os.mkdir(filePath)
         else:
-            createEmtyResource(filePath)
-            outfile = open(dir+ name, 'wb')
-            outfile.write(zfobj.read(name))
-            outfile.close()
+            if not os.path.exists(filePath):
+                createEmtyResource(filePath)
+                outfile = open(dir+ name, 'wb')
+                outfile.write(zfobj.read(name))
+                outfile.close()
 
 def createEmtyResource(path):
     splitdrive = os.path.splitdrive(path)