diff --git a/test/test_other.py b/test/test_other.py index 4a226a7b490bf..24acb02c13540 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -2704,7 +2704,7 @@ def test_emcc_debug_files(self): self.assertFalse(os.path.exists(self.canonical_temp_dir)) else: print(sorted(os.listdir(self.canonical_temp_dir))) - self.assertExists(os.path.join(self.canonical_temp_dir, 'emcc-3-original.js')) + self.assertExists(os.path.join(self.canonical_temp_dir, 'emcc-03-original.js')) def test_debuginfo_line_tables_only(self): def test(do_compile): diff --git a/tools/building.py b/tools/building.py index 549e3d5d61ddf..422281c00053e 100644 --- a/tools/building.py +++ b/tools/building.py @@ -1297,7 +1297,7 @@ def run_wasm_opt(infile, outfile=None, args=[], **kwargs): # noqa def save_intermediate(src, dst): if DEBUG: - dst = 'emcc-%d-%s' % (save_intermediate.counter, dst) + dst = 'emcc-%02d-%s' % (save_intermediate.counter, dst) save_intermediate.counter += 1 dst = os.path.join(shared.CANONICAL_TEMP_DIR, dst) logger.debug('saving debug copy %s' % dst)