Skip to content

Commit 8e993b4

Browse files
committed
ensure the end path wouldn't contain double slashes
1 parent 3500262 commit 8e993b4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/opcache/shared_alloc_win32.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ static char *get_mmap_base_file(void)
9595
GetTempPath(MAXPATHLEN, windir);
9696
GetUserName(uname, &unsize);
9797
l = strlen(windir);
98+
if ('\\' == windir[l-1]) {
99+
l--;
100+
}
98101
snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%s@%.32s", ACCEL_FILEMAP_BASE, uname, ZCG(system_id));
99102
return windir;
100103
}

0 commit comments

Comments
 (0)