Skip to content

Commit

Permalink
fix: Relative filename
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed Nov 24, 2023
1 parent dd8d0dc commit 3635a34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/operations/directoryContents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ function getDirectoryFiles(
const filename =
serverBase === "/"
? decodeURIComponent(normalisePath(href))
: decodeURIComponent(normalisePath(pathPosix.relative(serverBase, href)));
: normalisePath(
pathPosix.relative(decodeURIComponent(serverBase), decodeURIComponent(href))
);
return prepareFileFromProps(props, filename, isDetailed);
});

Expand Down

0 comments on commit 3635a34

Please sign in to comment.