fix updater crash on windows
This commit is contained in:
@@ -52,6 +52,8 @@ def check_addon_init():
|
|||||||
pos = n
|
pos = n
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
# evitiamo che dia errore perchè il file è già in uso
|
||||||
|
localCommitFile.close()
|
||||||
updateFromZip()
|
updateFromZip()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@@ -207,13 +209,12 @@ def updateFromZip():
|
|||||||
logger.info("kodiondemand.core.updater descomprime fichero...")
|
logger.info("kodiondemand.core.updater descomprime fichero...")
|
||||||
destpathname = xbmc.translatePath("special://home/addons/")
|
destpathname = xbmc.translatePath("special://home/addons/")
|
||||||
logger.info("kodiondemand.core.updater destpathname=%s" % destpathname)
|
logger.info("kodiondemand.core.updater destpathname=%s" % destpathname)
|
||||||
|
unzipper = ziptools()
|
||||||
|
unzipper.extract(localfilename, destpathname)
|
||||||
|
|
||||||
# puliamo tutto
|
# puliamo tutto
|
||||||
shutil.rmtree(addonDir)
|
shutil.rmtree(addonDir)
|
||||||
|
|
||||||
unzipper = ziptools()
|
|
||||||
unzipper.extract(localfilename, destpathname)
|
|
||||||
|
|
||||||
filetools.rename(destpathname + "addon-" + branch, addonDir)
|
filetools.rename(destpathname + "addon-" + branch, addonDir)
|
||||||
|
|
||||||
# Borra el zip descargado
|
# Borra el zip descargado
|
||||||
|
|||||||
Reference in New Issue
Block a user