paulpflug / foldername-tabs

Adds foldernames to tabs..
MIT License
16 stars 6 forks source link

URL paths aren't split correctly on Windows #18

Open taradinoc opened 7 years ago

taradinoc commented 7 years ago

The path splitting logic assumes all paths will be separated with the system path separator, but on Windows, a tab whose path is a URL will still use the '/' separator even though local file paths use '\'.

A quick workaround is to change all the calls to .split() to use a regex, so they split on both characters; paths are still joined using the system path separator. A more robust solution could detect the path separator for each tab individually, using either the system separator or '/' for splitting and joining.