Skip to content

Commit

Permalink
update tem directory fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Lu-Fi committed Aug 11, 2013
1 parent 9e72862 commit b3a9aba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.openelec.settings"
name="OpenELEC Configuration"
version="0.2.4"
version="0.2.5"
provider-name="OpenELEC">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2013-08-11 v0.2.5
(fix) update temp directory

2013-08-11 v0.2.4
(chg) notification redesign
(add) notification Icon
Expand Down
14 changes: 7 additions & 7 deletions resources/lib/modules/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ def do_autoupdate(self, listItem=None, silent=False):
os.makedirs(self.LOCAL_UPDATE_DIR)

downloaded = self.oe.download_file(self.update_file,
self.oe.temp_dir + '/' + self.update_file.split('/')[-1], silent)
self.oe.TEMP + self.update_file.split('/')[-1], silent)

if not downloaded is None:

Expand All @@ -900,13 +900,13 @@ def do_autoupdate(self, listItem=None, silent=False):
self.oe.notify(self.oe._(32363),
self.oe._(32366))

if not os.path.exists(self.oe.temp_dir
+ '/oe_update/'):
os.makedirs(self.oe.temp_dir + '/oe_update/')
if not os.path.exists(self.oe.TEMP
+ 'oe_update/'):
os.makedirs(self.oe.TEMP + 'oe_update/')

extract_files = ['target/', 'target/']
if self.oe.extract_file(downloaded, extract_files,
self.oe.temp_dir + '/oe_update/', silent) \
self.oe.TEMP + 'oe_update/', silent) \
== 1:

if self.struct['update']['settings'
Expand All @@ -916,8 +916,8 @@ def do_autoupdate(self, listItem=None, silent=False):

os.remove(downloaded)

for update_file in glob.glob(self.oe.temp_dir
+ '/oe_update/*'):
for update_file in glob.glob(self.oe.TEMP
+ 'oe_update/*'):
os.rename(update_file, self.LOCAL_UPDATE_DIR
+ update_file.rsplit('/')[-1])

Expand Down

0 comments on commit b3a9aba

Please sign in to comment.