Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Fix a bug where remoteSource is incorrect if it is a forward slash (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
quoctruong authored and ramya-rao-a committed Sep 27, 2019
1 parent a3c7571 commit 321dbc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/debugAdapter/goDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,8 @@ class GoDebugSession extends LoggingDebugSession {
if (i) {
localPath = llist.reverse().slice(0, -i).join(this.localPathSeparator) + this.localPathSeparator;
args.remotePath = rlist.reverse().slice(0, -i).join(this.remotePathSeparator) + this.remotePathSeparator;
} else if ((args.remotePath.endsWith('\\')) || (args.remotePath.endsWith('/'))) {
} else if (args.remotePath.length > 1 &&
(args.remotePath.endsWith('\\') || args.remotePath.endsWith('/'))) {
args.remotePath = args.remotePath.substring(0, args.remotePath.length - 1);
}
}
Expand Down

0 comments on commit 321dbc9

Please sign in to comment.