assert on FS.init being only called once

This commit is contained in:
Alon Zakai 2012-02-04 21:24:47 -08:00
Родитель 3e7c8fb5e1
Коммит 334bd00745
2 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -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();