Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid operation path on windows #2

Closed
summer-2014 opened this issue Jun 30, 2024 · 1 comment
Closed

Invalid operation path on windows #2

summer-2014 opened this issue Jun 30, 2024 · 1 comment

Comments

@summer-2014
Copy link
Contributor

On Windows, the path of the operation is invalid.

Perhaps it can be solved like this:

function getRoutePathName(filePath: string, rootPath: string) {
  return filePath
    .replace(rootPath, "")
    .replace("[", "{")
    .replace("]", "}")
    .replaceAll("\\", "/")    // add this line
    .replace("/route.ts", "");
}
@omermecitoglu
Copy link
Owner

Good catch. Why don't you make a pr and join as a contributor? 😉 I'll merge and release a quick patch for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants