From 9d9a76d6a1892a7df4807172495b0b72dd026da7 Mon Sep 17 00:00:00 2001 From: David Disu Date: Mon, 28 Feb 2022 13:00:02 +0100 Subject: [PATCH] Remove relative path prefix from path --- apps/remix-ide/src/app/files/workspaceFileProvider.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide/src/app/files/workspaceFileProvider.js b/apps/remix-ide/src/app/files/workspaceFileProvider.js index c616d3bd74..505be72b8c 100644 --- a/apps/remix-ide/src/app/files/workspaceFileProvider.js +++ b/apps/remix-ide/src/app/files/workspaceFileProvider.js @@ -32,6 +32,7 @@ class WorkspaceFileProvider extends FileProvider { removePrefix (path) { path = path.replace(/^\/|\/$/g, '') // remove first and last slash + path = path.replace(/^\.\/+/, '') // remove ./ from start of string if (path.startsWith(this.workspacesPath + '/' + this.workspace)) return path const splitPath = path.split('/')