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

fix: directory separator from routing file. #7487

Merged
merged 1 commit into from
May 14, 2023

Conversation

ping-yee
Copy link
Contributor

@ping-yee ping-yee commented May 8, 2023

Description
Fixes #7474

Normalize the route path.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

app/Config/Routing.php Outdated Show resolved Hide resolved
@lonnieezell
Copy link
Member

Have you checked this on Windows and verified that realpath() will actually solve the problem?

@ping-yee
Copy link
Contributor Author

Have you checked this on Windows and verified that realpath() will actually solve the problem?

Yep, I can pass the test cases on Windows (Linux also) with using realpath() to normalize the route path.

@ping-yee
Copy link
Contributor Author

ping-yee commented May 10, 2023

In Windows, the route path will be:

D:\project\github\CodeIgniter4\app\Config/Routes.php <= before handle normalize work with realpath()

D:\project\github\CodeIgniter4\app\Config\Routes.php <= after handled with realpath()

In Linux, the route path will not be changed after handled by realpath():

/mnt/d/project/github/CodeIgniter4/app/Config/Routes.php

@lonnieezell

@kenjis kenjis changed the title fix: fix the directory separator from routing file. fix: directory separator from routing file. May 12, 2023
@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label May 12, 2023
Copy link
Member

@kenjis kenjis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@kenjis kenjis merged commit 38e0b6e into codeigniter4:4.4 May 14, 2023
@ping-yee ping-yee deleted the fix-dir-separator branch June 13, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants