com php-src: Fix issues with path names and cwd: phpdbg_list .c phpdbg_print.c phpdbg_prompt.c
| From: | Bob Weinand | Date: | Sat, 04 Oct 2014 21:30:57 +0000 |
| Subject: | com php-src: Fix issues with path names and cwd: phpdbg_list .c phpdbg_print.c phpdbg_prompt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82603@lists.php.net to get a copy of this message | ||
Commit: 62465b6d821d3e074af06880d7d3e25fb7a9a038
Author: Bob Weinand <bobwei9@hotmail.com> Sat, 4 Oct 2014 23:30:57 +0200
Parents: 9d96cde268b85511dfb6526a907947bacd68b8e2
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=62465b6d821d3e074af06880d7d3e25fb7a9a038
Log:
Fix issues with path names and cwd
Changed paths:
M phpdbg_list.c
M phpdbg_print.c
M phpdbg_prompt.c
Diff:
diff --git a/phpdbg_list.c b/phpdbg_list.c
index 5757d33..96eacd4 100644
--- a/phpdbg_list.c
+++ b/phpdbg_list.c
@@ -246,6 +246,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type TSRMLS_DC) {
fake.free_filename = 0;
fake.opened_path = NULL;
fake.filename = filename;
+ fake.opened_path = file->opened_path;
*(dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint) * data.len)) = data;
zend_hash_add(&PHPDBG_G(file_sources), filename, strlen(filename), &dataptr,
sizeof(phpdbg_file_source *), NULL);
@@ -260,6 +261,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type TSRMLS_DC) {
ret = PHPDBG_G(compile_file)(&fake, type TSRMLS_CC);
+ fake.opened_path = NULL;
zend_file_handle_dtor(&fake TSRMLS_CC);
return ret;
diff --git a/phpdbg_print.c b/phpdbg_print.c
index e2b4dd2..594fc9a 100644
--- a/phpdbg_print.c
+++ b/phpdbg_print.c
@@ -248,7 +248,7 @@ PHPDBG_PRINT(func) /* {{{ */
phpdbg_error("The function %s could not be found", func_name);
}
} phpdbg_catch_access {
- phpdbg_error("Couldn't fetch function %.*s, invalid data source", func_name_len,
func_name);
+ phpdbg_error("Couldn't fetch function %.*s, invalid data source", (int)
func_name_len, func_name);
} phpdbg_end_try_access();
efree(lcname);
diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c
index a993c6c..0abb75a 100644
--- a/phpdbg_prompt.c
+++ b/phpdbg_prompt.c
@@ -351,7 +351,9 @@ PHPDBG_COMMAND(exec) /* {{{ */
PHPDBG_G(exec) = res;
PHPDBG_G(exec_len) = res_len;
-
+
+ VCWD_CHDIR_FILE(res);
+
*SG(request_info).argv = PHPDBG_G(exec);
php_hash_environment(TSRMLS_C);