Skip to content

Commit e25d4e7

Browse files
committed
flip
1 parent a4e2462 commit e25d4e7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/library_wasmfs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ var WasmfsLibrary = {
5050
createDataFile: function(parent, name, data, canRead, canWrite, canOwn) {
5151
// Data files must be cached until the file system itself has been initialized.
5252
var mode = FS.getMode(canRead, canWrite);
53-
var pathName = name ? parent + '/' + name : parent;
53+
var pathName = parent ? parent + '/' + name : name;
5454
wasmFS$preloadedFiles.push({pathName: pathName, fileData: data, mode: mode});
5555
},
5656
createPath: function(parent, path, canRead, canWrite) {

tools/file_packager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ def generate_js(data_target, data_files, metadata):
602602
}
603603
}, false, true); // canOwn this data in the filesystem, it is a slide into the heap that will never change\n'''
604604
create_data = '''// canOwn this data in the filesystem, it is a slide into the heap that will never change
605-
Module['FS_createDataFile'](this.name, null, byteArray, true, true, true);
605+
Module['FS_createDataFile'](null, this.name, byteArray, true, true, true);
606606
Module['removeRunDependency']('fp ' + that.name);'''
607607

608608
if not options.lz4:
@@ -649,7 +649,7 @@ def generate_js(data_target, data_files, metadata):
649649
var content = HEAPU32[start32++];
650650
var name = UTF8ToString(name_addr)
651651
// canOwn this data in the filesystem, it is a slice of wasm memory that will never change
652-
Module['FS_createDataFile'](name, null, HEAP8.subarray(content, content + len), true, true, true);
652+
Module['FS_createDataFile'](null, name, HEAP8.subarray(content, content + len), true, true, true);
653653
} while (HEAPU32[start32]);'''
654654
else:
655655
err('--obj-output is recommended when using --embed. This outputs an object file for linking directly into your application is more effecient than JS encoding')

0 commit comments

Comments
 (0)