]> granicus.if.org Git - php/commit
Fix #78220: Can't access OneDrive folder
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 19 Aug 2019 17:44:37 +0000 (19:44 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 19 Aug 2019 17:55:35 +0000 (19:55 +0200)
commit81f52158b42318f17f67468cccc4a8dc03bba942
tree13bb858a348ac752b65ff25fa875dc98a4b1ff31
parent725f439778a6397267fbb4e88059d704cccbc7f3
Fix #78220: Can't access OneDrive folder

As of Windows 1903, when the OneDrive on-demand feature is enabled, the
OneDrive folder is reported as reparse point by `FindFirstFile()`, but
trying to get information about the reparse point using
`DeviceIoControl()` fails with `ERROR_NOT_A_REPARSE_POINT`.  We work
around this problem by falling back to `GetFileInformationByHandle()`
if that happens, but only if the reparse point is reported as cloud
reparse point, and only if PHP is running on Windows 1903 or later.

The patch has been developed in collaboration with ab@php.net.

We should keep an eye on the somewhat quirky OneDrive behavior, since
it might change again in a future Windows release.
NEWS
Zend/zend_virtual_cwd.c
ext/standard/tests/dir/bug78220.phpt [new file with mode: 0644]