Skip to content

Commit 7f18d87

Browse files
Fixed crash in the ROM Scanner when Launcher had unconfigured ROM asset paths.
1 parent aa0b5d8 commit 7f18d87

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ FEATURE Export individual Launcher XML configuration.
7373

7474
FIX Fixed crash when editing Launchr Title in context menu.
7575

76+
FIX Fixed crash in the ROM Scanner when Launcher had unconfigured ROM asset paths.
77+
7678

7779
[B]Advanced Emulator Launcher | version 0.9.7-beta2 | 19 November 2017[/B]
7880

resources/autoconfig.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# --- Python standard library ---
1717
from __future__ import unicode_literals
1818
import os
19+
import time
1920

2021
# --- XML stuff ---
2122
# ~~~ cElementTree sometimes fails to parse XML in Kodi's Python interpreter... I don't know why
@@ -114,6 +115,7 @@ def autoconfig_export_all(categories, launchers, export_FN):
114115
# --- XML header ---
115116
str_list = []
116117
str_list.append('<?xml version="1.0" encoding="utf-8" standalone="yes"?>\n')
118+
str_list.append('<!-- Exported by AEL on {0} -->\n'.format(time.strftime("%Y-%m-%d %H:%M:%S")))
117119
str_list.append('<advanced_emulator_launcher_configuration>\n')
118120

119121
# --- Export Categories ---
@@ -177,6 +179,7 @@ def autoconfig_export_launcher(launcher, export_FN, categories):
177179
# --- Create list of strings ---
178180
str_list = []
179181
str_list.append('<?xml version="1.0" encoding="utf-8" standalone="yes"?>\n')
182+
str_list.append('<!-- Exported by AEL on {0} -->\n'.format(time.strftime("%Y-%m-%d %H:%M:%S")))
180183
str_list.append('<advanced_emulator_launcher_configuration>\n')
181184
autoconfig_export_launcher_str_list(launcher, category_name, str_list)
182185
str_list.append('</advanced_emulator_launcher_configuration>\n')

resources/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,9 @@ def misc_add_file_cache(dir_str):
377377
global file_cache
378378

379379
# >> Create a set with all the files in the directory
380+
if not dir_str:
381+
log_debug('misc_add_file_cache() Empty dir_str. Exiting')
382+
return
380383
dir_FN = FileName(dir_str)
381384
log_debug('misc_add_file_cache() Scanning OP "{0}"'.format(dir_FN.getOriginalPath()))
382385
log_debug('misc_add_file_cache() Scanning P "{0}"'.format(dir_FN.getPath()))

0 commit comments

Comments
 (0)