SublimeHyperClick icon indicating copy to clipboard operation
SublimeHyperClick copied to clipboard

fix: fix alias path with up-level references resolve issue

Open jfcherng opened this issue 3 years ago • 0 comments

This is another attempt to implement #84 and closes #91.


The implementation issue in the original PR is

path_parts = self.str_path.split(path.sep)

won't split on Windows, whose path.sep is \, while people use / as the separator in the import path (self.str_path). And thus the followed if path_parts[0] == alias: never be True because path_parts[0] is identical to self.str_path.

This PR treats both \ and / as path separators while spliting.

jfcherng avatar Jun 15 '22 15:06 jfcherng