mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
Merge branch 'PHP-7.1'
* PHP-7.1: Fixed bug #73360 Unable to work in root with unicode chars
This commit is contained in:
commit
04bba0c078
1 changed files with 3 additions and 3 deletions
|
@ -1400,7 +1400,7 @@ static void php_cli_server_request_translate_vpath(php_cli_server_request *reque
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
q = p;
|
q = p;
|
||||||
while (q > buf) {
|
while (q > buf) {
|
||||||
if (!zend_stat(buf, &sb)) {
|
if (!VCWD_STAT(buf, &sb)) {
|
||||||
if (sb.st_mode & S_IFDIR) {
|
if (sb.st_mode & S_IFDIR) {
|
||||||
const char **file = index_files;
|
const char **file = index_files;
|
||||||
if (q[-1] != DEFAULT_SLASH) {
|
if (q[-1] != DEFAULT_SLASH) {
|
||||||
|
@ -1409,7 +1409,7 @@ static void php_cli_server_request_translate_vpath(php_cli_server_request *reque
|
||||||
while (*file) {
|
while (*file) {
|
||||||
size_t l = strlen(*file);
|
size_t l = strlen(*file);
|
||||||
memmove(q, *file, l + 1);
|
memmove(q, *file, l + 1);
|
||||||
if (!zend_stat(buf, &sb) && (sb.st_mode & S_IFREG)) {
|
if (!VCWD_STAT(buf, &sb) && (sb.st_mode & S_IFREG)) {
|
||||||
q += l;
|
q += l;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2502,7 +2502,7 @@ int do_cli_server(int argc, char **argv) /* {{{ */
|
||||||
if (document_root) {
|
if (document_root) {
|
||||||
zend_stat_t sb;
|
zend_stat_t sb;
|
||||||
|
|
||||||
if (zend_stat(document_root, &sb)) {
|
if (VCWD_STAT(document_root, &sb)) {
|
||||||
fprintf(stderr, "Directory %s does not exist.\n", document_root);
|
fprintf(stderr, "Directory %s does not exist.\n", document_root);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue