diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-10-26 11:21:35 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-10-26 11:21:52 +0100 |
commit | ac2e9587fb3007c019c13ea1405cafcc8bc5e7b8 (patch) | |
tree | b5db52dd3c3741a0a351150a9664daf0bf3b6bbc | |
parent | 8b59e4e8972629d59a1f29d0a371cf68bf7087f2 (diff) | |
parent | 848e24f24d7c05db04fe1ba87e6566a5c30323fd (diff) | |
download | php-git-ac2e9587fb3007c019c13ea1405cafcc8bc5e7b8.tar.gz |
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #80258: Windows Deduplication Enabled, randon permission errors
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | Zend/zend_virtual_cwd.c | 6 |
2 files changed, 6 insertions, 2 deletions
@@ -5,6 +5,8 @@ PHP NEWS - Core: . Fixed bug #80280 (ADD_EXTENSION_DEP() fails for ext/standard and ext/date). (cmb) + . Fixed bug #80258 (Windows Deduplication Enabled, randon permission errors). + (cmb) - IMAP: . Fixed bug #64076 (imap_sort() does not return FALSE on failure). (cmb) diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c index 22b92728bc..382a40d6ca 100644 --- a/Zend/zend_virtual_cwd.c +++ b/Zend/zend_virtual_cwd.c @@ -492,7 +492,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(void) static size_t tsrm_realpath_r(char *path, size_t start, size_t len, int *ll, time_t *t, int use_realpath, int is_dir, int *link_is_dir) /* {{{ */ { size_t i, j; - int directory = 0, save; + int directory = 0, save, may_retry_reparse_point; #ifdef ZEND_WIN32 WIN32_FIND_DATAW dataw; HANDLE hFind = INVALID_HANDLE_VALUE; @@ -597,6 +597,7 @@ static size_t tsrm_realpath_r(char *path, size_t start, size_t len, int *ll, tim #ifdef ZEND_WIN32 retry_reparse_point: + may_retry_reparse_point = 0; if (save) { pathw = php_win32_ioutil_any_to_w(path); if (!pathw) { @@ -691,6 +692,7 @@ retry_reparse_tag_cloud: CloseHandle(hLink); if(pbuffer->ReparseTag == IO_REPARSE_TAG_SYMLINK) { + may_retry_reparse_point = 1; reparsetarget = pbuffer->SymbolicLinkReparseBuffer.ReparseTarget; isabsolute = pbuffer->SymbolicLinkReparseBuffer.Flags == 0; #if VIRTUAL_CWD_DEBUG @@ -827,7 +829,7 @@ retry_reparse_tag_cloud: free_alloca(pbuffer, use_heap_large); free(substitutename); - { + if (may_retry_reparse_point) { DWORD attrs; FREE_PATHW() |