mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
Git - fallback to relative() when computing relative paths (#247848)
This commit is contained in:
@@ -3008,8 +3008,8 @@ export class Repository {
|
||||
return relativePath;
|
||||
}
|
||||
|
||||
// Fallback to the original path
|
||||
filePath = sanitizeRelativePath(filePath);
|
||||
// Fallback to relative()
|
||||
filePath = sanitizeRelativePath(path.relative(this.repositoryRoot, filePath));
|
||||
this.logger.trace(`[Git][sanitizeRelativePath] relativePath (fallback): ${filePath}`);
|
||||
return filePath;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user