summaryrefslogtreecommitdiff
path: root/ext/opcache/shared_alloc_win32.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-01-13 16:54:10 +0100
committerAnatol Belski <ab@php.net>2017-01-13 16:54:10 +0100
commita7b20894e5aa0b0b1a310508b5fb708541657786 (patch)
tree0a422d7823465b930509ac636b6763b3e5e22cda /ext/opcache/shared_alloc_win32.c
parent2ae5f2d1a5a208cc748b509cf71fdceb0989520a (diff)
parent8e993b427ccc5e410ab95f9d1079965862b14969 (diff)
downloadphp-git-a7b20894e5aa0b0b1a310508b5fb708541657786.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: ensure the end path wouldn't contain double slashes
Diffstat (limited to 'ext/opcache/shared_alloc_win32.c')
-rw-r--r--ext/opcache/shared_alloc_win32.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c
index 7532fe1688..0cf65cf90a 100644
--- a/ext/opcache/shared_alloc_win32.c
+++ b/ext/opcache/shared_alloc_win32.c
@@ -102,6 +102,9 @@ static char *get_mmap_base_file(void)
}
GetTempPath(MAXPATHLEN, windir);
l = strlen(windir);
+ if ('\\' == windir[l-1]) {
+ l--;
+ }
snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%s@%.32s", ACCEL_FILEMAP_BASE, uname, ZCG(system_id));
free(uname);