Skip to content

Commit 78ecf1d

Browse files
committed
Do NOT expand path to support special characters in path.
For example, React Router v7 with file-based routing use `$paramName` in path and that is not environment variable.
1 parent 70b2116 commit 78ecf1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

denops/gin/util/ensure_path.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export async function ensurePath(
1515
denops: Denops,
1616
path?: string,
1717
): Promise<string> {
18-
const bufname = await fn.expand(denops, path ?? "%") as string;
19-
const abspath = await fn.fnamemodify(denops, bufname, ":p");
18+
const expr = path ?? await fn.bufname(denops);
19+
const abspath = await fn.fnamemodify(denops, expr, ":p");
2020
return abspath;
2121
}

0 commit comments

Comments
 (0)