Skip to content

Commit

Permalink
Merge pull request #92 from Greatness7/master
Browse files Browse the repository at this point in the history
Fix incorrect behavior when dealing with absolute paths.
  • Loading branch information
mihai-vlc committed Feb 7, 2021
2 parents 256dfda + 087d5fe commit 0771415
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/features/PathAutocompleteProvider.ts
Expand Up @@ -215,7 +215,12 @@ export class PathAutocomplete implements vs.CompletionItemProvider {

// relative to the disk
if (insertedPath.match(/^[a-z]:/i)) {
return [path.resolve(insertedPath)];
var resolved = path.resolve(insertedPath);
// restore trailing slashes if they were removed
if (resolved.slice(-1) != insertedPath.slice(-1)) {
resolved += insertedPath.substr(-1);
}
return [resolved];
}

// user folder
Expand Down

0 comments on commit 0771415

Please sign in to comment.