You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2022/04/06 14:33:13 UTC

[camel-karavan] branch main updated: Fix #278 windows path issue (#282)

This is an automated email from the ASF dual-hosted git repository.

marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git


The following commit(s) were added to refs/heads/main by this push:
     new 5970931  Fix #278 windows path issue (#282)
5970931 is described below

commit 5970931ec961da7e7fa9fd021b51679446d200d7
Author: cgballance <cg...@gmail.com>
AuthorDate: Wed Apr 6 10:33:09 2022 -0400

    Fix #278 windows path issue (#282)
---
 karavan-vscode/src/utils.ts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/karavan-vscode/src/utils.ts b/karavan-vscode/src/utils.ts
index 05744ac..04f1165 100644
--- a/karavan-vscode/src/utils.ts
+++ b/karavan-vscode/src/utils.ts
@@ -34,7 +34,8 @@ export function save(relativePath: string, yaml: string){
 
 export function getRalativePath(fullPath: string): string {
     const root = vscode.workspace.workspaceFolders ? vscode.workspace.workspaceFolders[0].uri.path : "";
-    const relativePath = path.resolve(fullPath).replace(path.resolve(root) + path.sep, '');
+    const normalizedRoot = vscode.Uri.file(root).fsPath ;
+    const relativePath = path.resolve(fullPath).replace(normalizedRoot + path.sep, '');
     return relativePath;
 }