Skip to content

Commit ab51614

Browse files
author
Orta
authored
Merge pull request #734 from adill/fix/signature-popup-path
Use `os.path.relpath` on a normalized Packages base path
2 parents 913aefc + f14209a commit ab51614

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

typescript/libs/popup_manager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def load_html_template(html_file_name):
286286
html_path = os.path.join(PLUGIN_DIR, html_file_name)
287287

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

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

0 commit comments

Comments
 (0)