diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c index 7532fe1688f..0cf65cf90ab 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);