DocumentUri in windows comes in the format file:///C:/path/folder/example.js, when it's passed to getCurrentDirFromUri, the function returns /C:/path/folder/ which after being passed to path.resolve() provokes the duplicated drive bug.
This PR replaces the manual convertion of uri to path with the nodeJS function url.fileURLToPath documented here which has all filesystem differences covered.
DocumentUri in windows comes in the format
file:///C:/path/folder/example.js
, when it's passed togetCurrentDirFromUri
, the function returns/C:/path/folder/
which after being passed topath.resolve()
provokes the duplicated drive bug.This PR replaces the manual convertion of uri to path with the nodeJS function url.fileURLToPath documented here which has all filesystem differences covered.
Fixes #14