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 #78296: is_file fails to detect file #4943

Closed
wants to merge 2 commits into from
Closed

Conversation

cmb69
Copy link
Contributor

@cmb69 cmb69 commented Nov 25, 2019

If we're constructing extended-length paths (i.e. paths prefixed with
\\?\), we have to replace all forward slashes with backward slashes,
because the former are not supported by Windows for extended-length
paths.

The more efficient and likely cleaner alternative solution would be to
cater to this in php_win32_ioutil_normalize_path_w() by always
replacing forward slashes, but that might break existing code. It
might be sensible to change that for master, though.

If we're constructing extended-length paths (i.e. paths prefixed with
`\\?\`), we have to replace all forward slashes with backward slashes,
because the former are not supported by Windows for extended-length
paths.

The more efficient and likely cleaner alternative solution would be to
cater to this in `php_win32_ioutil_normalize_path_w()` by always
replacing forward slashes, but that might break existing code.  It
might be sensible to change that for `master`, though.
@cmb69
Copy link
Contributor Author

cmb69 commented Nov 25, 2019

@weltling may be interested in reviewing this PR.

@cmb69 cmb69 added the Bug label Nov 25, 2019
@cmb69
Copy link
Contributor Author

cmb69 commented Nov 27, 2019

If there are no objections, I'll merge this PR on Monday, so it gets into PHP 7.3.13 and 7.4.1.

cc @weltling

@cmb69
Copy link
Contributor Author

cmb69 commented Dec 2, 2019

Applied as bb735c9. Thanks.

@cmb69 cmb69 closed this Dec 2, 2019
@cmb69 cmb69 deleted the fix-78296-2 branch December 2, 2019 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant