Skip to content

Commit

Permalink
Merge pull request #734 from adill/fix/signature-popup-path
Browse files Browse the repository at this point in the history
Use `os.path.relpath` on a normalized Packages base path
  • Loading branch information
Orta committed Jan 15, 2020
2 parents 913aefc + f14209a commit ab51614
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typescript/libs/popup_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def load_html_template(html_file_name):
html_path = os.path.join(PLUGIN_DIR, html_file_name)

# Needs to be in format such as: 'Packages/TypeScript/signature_popup.html'
rel_path = html_path[len(sublime.packages_path()) - len('Packages'):]
rel_path = os.path.relpath(html_path, os.path.normpath(os.path.join(sublime.packages_path(), '..')))
rel_path = rel_path.replace('\\', '/') # Yes, even on Windows

log.info('Loaded html template from {0}'.format(rel_path))
Expand Down

0 comments on commit ab51614

Please sign in to comment.