]> granicus.if.org Git - php/commitdiff
- Fix logic
authorMarcus Boerger <helly@php.net>
Sat, 23 Feb 2008 13:04:59 +0000 (13:04 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 23 Feb 2008 13:04:59 +0000 (13:04 +0000)
ext/phar/stream.c

index 2863bd610063761b446e67f63098a8b1639d2088..ac6aacef90f5d5d0dd5b91bb2c71ad0fcb2e915a 100644 (file)
@@ -273,7 +273,7 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, char *pat
                char *entry = idata->internal_file->filename, *cwd;
 
                PHAR_G(cwd_init) = 1;
-               if (idata->phar->is_tar || idata->phar->is_zip && idata->internal_file->filename_len == sizeof(".phar/stub.php")-1 && !strncmp(idata->internal_file->filename, ".phar/stub.php", sizeof(".phar/stub.php")-1)) {
+               if ((idata->phar->is_tar || idata->phar->is_zip) && idata->internal_file->filename_len == sizeof(".phar/stub.php")-1 && !strncmp(idata->internal_file->filename, ".phar/stub.php", sizeof(".phar/stub.php")-1)) {
                        /* we're executing the stub, which doesn't count as a file */
                        PHAR_G(cwd_init) = 0;
                } else if ((cwd = strrchr(entry, '/'))) {