Skip to content

Commit

Permalink
Support trailing slash in isfs directory URIs (#1357)
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-bsaviano authored May 9, 2024
1 parent cee4a1e commit 28a504b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/providers/FileSystemProvider/FileSystemProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
if (!entry.Name.includes(".")) {
if (!parent.entries.has(entry.Name)) {
const folder = !csp
? uri.path.replace(/\//g, ".")
? uri.path.replace(/\/$/, "").replace(/\//g, ".")
: uri.path === "/"
? ""
: uri.path.endsWith("/")
Expand Down Expand Up @@ -247,7 +247,7 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
}
const csp = params.has("csp") && ["", "1"].includes(params.get("csp"));
const folder = !csp
? uri.path.replace(/\//g, ".")
? uri.path.replace(/\/$/, "").replace(/\//g, ".")
: uri.path === "/"
? ""
: uri.path.endsWith("/")
Expand Down
2 changes: 1 addition & 1 deletion src/utils/FileProviderUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function fileSpecFromURI(uri: vscode.Uri): string {
const csp = params.has("csp") && ["", "1"].includes(params.get("csp"));

const folder = !csp
? uri.path.replace(/\//g, ".")
? uri.path.replace(/\/$/, "").replace(/\//g, ".")
: uri.path === "/"
? ""
: uri.path.endsWith("/")
Expand Down

0 comments on commit 28a504b

Please sign in to comment.