aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-10-01 11:02:01 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-10-01 11:02:01 -0700
commit5a7de50f0089421508e3bd94bfda21e661135d37 (patch)
tree53509664741b6b235308e1638c5db106eb6ab026 /tools
parent375982d9c18ec64764c9ab14406e5712493e2cb3 (diff)
fix file paths with --embed, fixes #597
Diffstat (limited to 'tools')
-rw-r--r--tools/file_packager.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/file_packager.py b/tools/file_packager.py
index a764b746..9bf781e4 100644
--- a/tools/file_packager.py
+++ b/tools/file_packager.py
@@ -252,7 +252,7 @@ for file_ in data_files:
filename = file_['name']
if file_['mode'] == 'embed':
# Embed
- code += '''Module['FS_createDataFile']('/', '%s', %s, true, true);\n''' % (os.path.basename(filename), str(map(ord, open(file_['localname'], 'rb').read())))
+ code += '''Module['FS_createDataFile']('/%s', '%s', %s, true, true);\n''' % (os.path.dirname(filename), os.path.basename(filename), str(map(ord, open(file_['localname'], 'rb').read())))
elif file_['mode'] == 'preload':
# Preload
varname = 'filePreload%d' % counter