Skip to content

Commit

Permalink
Fixes #94882 -- checks for trailing \ & protects
Browse files Browse the repository at this point in the history
if somehow `networkPath` had a trailing \, it would cause this behavior
  • Loading branch information
Eric Amodio authored and eamodio committed Apr 16, 2020
1 parent e19e82b commit ff91584
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extensions/git/src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,10 @@ export class Git {
);
if (networkPath !== undefined) {
return path.normalize(
repoUri.fsPath.replace(networkPath, `${letter.toLowerCase()}:`),
repoUri.fsPath.replace(
networkPath,
`${letter.toLowerCase()}:${networkPath.endsWith('\\') ? '\\' : ''}`
),
);
}
} catch { }
Expand Down

0 comments on commit ff91584

Please sign in to comment.