assert on FS.init being only called once
This commit is contained in:
Родитель
3e7c8fb5e1
Коммит
334bd00745
|
@ -303,7 +303,7 @@ LibraryManager.library = {
|
|||
// optional handlers.
|
||||
init: function(input, output, error) {
|
||||
// Make sure we initialize only once.
|
||||
if (FS.init.initialized) return;
|
||||
assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)');
|
||||
FS.init.initialized = true;
|
||||
|
||||
FS.ensureRoot();
|
||||
|
|
|
@ -4321,7 +4321,6 @@ def process(filename):
|
|||
def process(filename):
|
||||
src = open(filename, 'a')
|
||||
src.write(\'\'\'
|
||||
FS.init();
|
||||
FS.createPath('/', 'dev/shm/tmp', true, true);
|
||||
FS.currentPath = '/dev/shm/tmp';
|
||||
run();
|
||||
|
|
Загрузка…
Ссылка в новой задаче