pr0g/switch-corresponding

Not working on Windows

stef-levesque opened this issue ยท 5 comments

The extension will fail when provided with a file path using '' (like on Windows)

Using the following should solve the problem

var path = require('path');
var fileNameAndExtension = path.basename(filePath);
pr0g commented

Oh crap good find! Sorry total schoolboy error there! I will fix that asap. Cheers!

pr0g commented

This should be fixed now - thanks for the suggested fix. I haven't been able to test on Windows unfortunately (poor form I know but I don't have a windows machine atm - El Capitan broken my bootcamp partition... anyway I digress, if you could please grab the latest version and give that a test that'd be amazing!

Thanks again! ๐Ÿ‘ :)

pr0g commented

I should have consulted this - https://gist.github.com/domenic/2790533#paths-and-urls ๐Ÿ˜

Cheers! ๐Ÿ‘

Works now, thanks !
btw, useful extension ๐Ÿ˜ƒ

pr0g commented

Awesome glad to hear!! ๐Ÿ˜„ Not at all! Thanks for letting me know about the problem!