mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
parent
ff466b5d02
commit
80038e3c8e
1 changed files with 2 additions and 1 deletions
|
@ -267,7 +267,8 @@ export class WorkspaceHandler {
|
|||
if (uri && uri.startsWith(prefix)) {
|
||||
const locationPath = fs.realpathSync(decodeURIComponent(uri.substring(prefix.length)));
|
||||
const workspacePath = fs.realpathSync(decodeURIComponent(this.workspacePath));
|
||||
if (locationPath.startsWith(workspacePath)) {
|
||||
// On windows, it's possible one path has c:\ and another has C:\, so we need compare case-insensitive
|
||||
if (locationPath.toLocaleLowerCase().startsWith(workspacePath.toLocaleLowerCase())) {
|
||||
let relativePath = path.relative(workspacePath, locationPath);
|
||||
if (path.sep === '\\') {
|
||||
relativePath = relativePath.replace(/\\/gi, '/');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue