Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 committed Apr 21, 2022
1 parent bced363 commit d48d12a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tools/wasm-sourcemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,13 @@ def build_sourcemap(entries, code_section_offset, prefixes, collect_sources, bas
if prefixes.provided():
source_name = prefixes.sources.resolve(file_name)
else:
if not os.path.isabs(file_name):
try:
file_name = os.path.abspath(file_name)
try:
common = os.path.commonpath([file_name, base_path])
if os.path.commonpath([file_name, base_path]):
file_name = os.path.relpath(file_name, base_path)
except ValueError:
file_name = os.path.abspath(file_name)
except ValueError:
pass
file_name = normalize_path(file_name)
source_name = file_name
if source_name not in sources_map:
Expand Down

0 comments on commit d48d12a

Please sign in to comment.