com php-src: ensure the end path wouldn't contain double slashes: ext/opcache/shared_alloc_win32.c

From: Date: Fri, 13 Jan 2017 15:50:05 +0000
Subject: com php-src: ensure the end path wouldn't contain double slashes: ext/opcache/shared_alloc_win32.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96717@lists.php.net to get a copy of this message
Commit: 8e993b427ccc5e410ab95f9d1079965862b14969 Author: Anatol Belski <ab@php.net> Fri, 13 Jan 2017 16:50:05 +0100 Parents: 3500262b7d0388cb9ad7c2418286cedc8145eb23 Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8e993b427ccc5e410ab95f9d1079965862b14969 Log: ensure the end path wouldn't contain double slashes Changed paths: M ext/opcache/shared_alloc_win32.c Diff: diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c index 17af776..d05f01c 100644 --- a/ext/opcache/shared_alloc_win32.c +++ b/ext/opcache/shared_alloc_win32.c @@ -95,6 +95,9 @@ static char *get_mmap_base_file(void) GetTempPath(MAXPATHLEN, windir); GetUserName(uname, &unsize); 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)); return windir; }

« previous php.cvs (#96717) next »