]> granicus.if.org Git - php/commitdiff
- Revert the tar.c part of the inode calculation fix
authorSteph Fox <sfox@php.net>
Sun, 22 Jun 2008 14:46:10 +0000 (14:46 +0000)
committerSteph Fox <sfox@php.net>
Sun, 22 Jun 2008 14:46:10 +0000 (14:46 +0000)
- All tests now pass under win32, please test under *nix/osx (4 known fails at present)

ext/phar/tar.c

index 51a4026390a50b97ccf0b1bff2cb8905bf034da5..8f12943122f8a5d0c8babb76421db100d8f12d2e 100644 (file)
@@ -223,11 +223,6 @@ int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char *alias,
                zend_get_hash_value, NULL, (zend_bool)myphar->is_persistent);
        zend_hash_init(&myphar->virtual_dirs, 4 + (totalsize >> 11),
                zend_get_hash_value, NULL, (zend_bool)myphar->is_persistent);
-       myphar->fname = pestrndup(fname, fname_len, myphar->is_persistent);
-#ifdef PHP_WIN32
-       phar_unixify_path_separators(myphar->fname, fname_len);
-#endif
-       myphar->fname_len = fname_len;
        myphar->is_tar = 1;
        /* remember whether this entire phar was compressed with gz/bzip2 */
        myphar->flags = compression;
@@ -549,6 +544,11 @@ bail:
                return FAILURE;
        }
 
+       myphar->fname = pestrndup(fname, fname_len, myphar->is_persistent);
+#ifdef PHP_WIN32
+       phar_unixify_path_separators(myphar->fname, fname_len);
+#endif
+       myphar->fname_len = fname_len;
        myphar->fp = fp;
        p = strrchr(myphar->fname, '/');