Professional Web Applications Themes

#40228 [NEW]: extractTo not extracting empty directories - PHP Bugs

From: php-bugs at spuetz dot ath dot cx Operating system: Linux PHP version: 5.2.0 PHP Bug Type: Zip Related Bug description: extractTo not extracting empty directories Description: ------------ I have a issue with extractTo(), it's not extracting empty directories. Reproduce code: --------------- $ mkdir -p test/empty $ zip -r test.zip test adding: test/ (stored 0%) adding: test/empty/ (stored 0%) $ rm -rf test $ php -r '$zip = new ZipArchive(); $zip->open("test.zip"); $zip->extractTo("./");' Expected result: ---------------- unzip works as expected: $ unzip test.zip Archive: test.zip creating: test/ creating: test/empty/ find .. ../test ../test/empty ../test.zip Actual result: -------------- $ find .. ../test ...

  1. #1

    Default #40228 [NEW]: extractTo not extracting empty directories

    From: php-bugs at spuetz dot ath dot cx
    Operating system: Linux
    PHP version: 5.2.0
    PHP Bug Type: Zip Related
    Bug description: extractTo not extracting empty directories

    Description:
    ------------
    I have a issue with extractTo(), it's not extracting empty directories.

    Reproduce code:
    ---------------
    $ mkdir -p test/empty
    $ zip -r test.zip test
    adding: test/ (stored 0%)
    adding: test/empty/ (stored 0%)
    $ rm -rf test
    $ php -r '$zip = new ZipArchive(); $zip->open("test.zip");
    $zip->extractTo("./");'


    Expected result:
    ----------------
    unzip works as expected:

    $ unzip test.zip
    Archive: test.zip
    creating: test/
    creating: test/empty/
    find
    ..
    ../test
    ../test/empty
    ../test.zip


    Actual result:
    --------------
    $ find
    ..
    ../test
    ../test.zip


    --
    Edit bug report at [url]http://bugs.php.net/?id=40228&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40228&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40228&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40228&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40228&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=40228&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=40228&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40228&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=40228&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=40228&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=40228&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=40228&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=40228&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=40228&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40228&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=40228&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=40228&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40228&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=40228&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40228&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40228&r=mysqlcfg[/url]
    php-bugs at spuetz dot ath dot cx Guest

  2. #2

    Default #40228 [Opn->Fbk]: extractTo not extracting empty directories

    ID: 40228
    Updated by: [email]tony2001php.net[/email]
    Reported By: php-bugs at spuetz dot ath dot cx
    -Status: Open
    +Status: Feedback
    Bug Type: Zip Related
    Operating System: Linux
    PHP Version: 5.2.0
    New Comment:

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]




    Previous Comments:
    ------------------------------------------------------------------------

    [2007-01-24 23:50:22] php-bugs at spuetz dot ath dot cx

    Description:
    ------------
    I have a issue with extractTo(), it's not extracting empty directories.

    Reproduce code:
    ---------------
    $ mkdir -p test/empty
    $ zip -r test.zip test
    adding: test/ (stored 0%)
    adding: test/empty/ (stored 0%)
    $ rm -rf test
    $ php -r '$zip = new ZipArchive(); $zip->open("test.zip");
    $zip->extractTo("./");'


    Expected result:
    ----------------
    unzip works as expected:

    $ unzip test.zip
    Archive: test.zip
    creating: test/
    creating: test/empty/
    find
    ..
    ../test
    ../test/empty
    ../test.zip


    Actual result:
    --------------
    $ find
    ..
    ../test
    ../test.zip



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40228&edit=1[/url]
    tony2001@php.net Guest

  3. #3

    Default #40228 [Fbk->Opn]: extractTo not extracting empty directories

    ID: 40228
    User updated by: php-bugs at spuetz dot ath dot cx
    Reported By: php-bugs at spuetz dot ath dot cx
    -Status: Feedback
    +Status: Open
    Bug Type: Zip Related
    Operating System: Linux
    PHP Version: 5.2.0
    New Comment:

    It still doesn't work with:

    $ php -v
    PHP 5.2.1RC4-dev (cli) (built: Jan 25 2007 01:13:23)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-01-24 23:53:55] [email]tony2001php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]



    ------------------------------------------------------------------------

    [2007-01-24 23:50:22] php-bugs at spuetz dot ath dot cx

    Description:
    ------------
    I have a issue with extractTo(), it's not extracting empty directories.

    Reproduce code:
    ---------------
    $ mkdir -p test/empty
    $ zip -r test.zip test
    adding: test/ (stored 0%)
    adding: test/empty/ (stored 0%)
    $ rm -rf test
    $ php -r '$zip = new ZipArchive(); $zip->open("test.zip");
    $zip->extractTo("./");'


    Expected result:
    ----------------
    unzip works as expected:

    $ unzip test.zip
    Archive: test.zip
    creating: test/
    creating: test/empty/
    find
    ..
    ../test
    ../test/empty
    ../test.zip


    Actual result:
    --------------
    $ find
    ..
    ../test
    ../test.zip



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40228&edit=1[/url]
    php-bugs at spuetz dot ath dot cx Guest

  4. #4

    Default #40228 [Opn->Fbk]: extractTo not extracting empty directories

    ID: 40228
    Updated by: [email]pajoyephp.net[/email]
    Reported By: php-bugs at spuetz dot ath dot cx
    -Status: Open
    +Status: Feedback
    Bug Type: Zip Related
    Operating System: Linux
    PHP Version: 5.2.0
    -Assigned To:
    +Assigned To: pajoye
    New Comment:

    Can you provide a link to the "test.zip" archive please?

    Thanks,


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-01-25 00:19:26] php-bugs at spuetz dot ath dot cx

    It still doesn't work with:

    $ php -v
    PHP 5.2.1RC4-dev (cli) (built: Jan 25 2007 01:13:23)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

    ------------------------------------------------------------------------

    [2007-01-24 23:53:55] [email]tony2001php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]



    ------------------------------------------------------------------------

    [2007-01-24 23:50:22] php-bugs at spuetz dot ath dot cx

    Description:
    ------------
    I have a issue with extractTo(), it's not extracting empty directories.

    Reproduce code:
    ---------------
    $ mkdir -p test/empty
    $ zip -r test.zip test
    adding: test/ (stored 0%)
    adding: test/empty/ (stored 0%)
    $ rm -rf test
    $ php -r '$zip = new ZipArchive(); $zip->open("test.zip");
    $zip->extractTo("./");'


    Expected result:
    ----------------
    unzip works as expected:

    $ unzip test.zip
    Archive: test.zip
    creating: test/
    creating: test/empty/
    find
    ..
    ../test
    ../test/empty
    ../test.zip


    Actual result:
    --------------
    $ find
    ..
    ../test
    ../test.zip



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40228&edit=1[/url]
    pajoye@php.net Guest

  5. #5

    Default #40228 [Fbk->Opn]: extractTo not extracting empty directories

    ID: 40228
    User updated by: php-bugs at spuetz dot ath dot cx
    Reported By: php-bugs at spuetz dot ath dot cx
    -Status: Feedback
    +Status: Open
    Bug Type: Zip Related
    Operating System: Linux
    PHP Version: 5.2.0
    Assigned To: pajoye
    New Comment:

    [url]http://mas.screenwork-dev.de/test.zip[/url]

    md5 hash is 5f681fa09b179d4763421ea724b3a207


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-01-25 00:21:27] [email]pajoyephp.net[/email]

    Can you provide a link to the "test.zip" archive please?

    Thanks,

    ------------------------------------------------------------------------

    [2007-01-25 00:19:26] php-bugs at spuetz dot ath dot cx

    It still doesn't work with:

    $ php -v
    PHP 5.2.1RC4-dev (cli) (built: Jan 25 2007 01:13:23)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

    ------------------------------------------------------------------------

    [2007-01-24 23:53:55] [email]tony2001php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]



    ------------------------------------------------------------------------

    [2007-01-24 23:50:22] php-bugs at spuetz dot ath dot cx

    Description:
    ------------
    I have a issue with extractTo(), it's not extracting empty directories.

    Reproduce code:
    ---------------
    $ mkdir -p test/empty
    $ zip -r test.zip test
    adding: test/ (stored 0%)
    adding: test/empty/ (stored 0%)
    $ rm -rf test
    $ php -r '$zip = new ZipArchive(); $zip->open("test.zip");
    $zip->extractTo("./");'


    Expected result:
    ----------------
    unzip works as expected:

    $ unzip test.zip
    Archive: test.zip
    creating: test/
    creating: test/empty/
    find
    ..
    ../test
    ../test/empty
    ../test.zip


    Actual result:
    --------------
    $ find
    ..
    ../test
    ../test.zip



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40228&edit=1[/url]
    php-bugs at spuetz dot ath dot cx Guest

  6. #6

    Default #40228 [Opn->Asn]: extractTo not extracting empty directories

    ID: 40228
    Updated by: [email]tony2001php.net[/email]
    Reported By: php-bugs at spuetz dot ath dot cx
    -Status: Open
    +Status: Assigned
    Bug Type: Zip Related
    Operating System: Linux
    PHP Version: 5.2.0
    Assigned To: pajoye


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-01-25 08:44:19] php-bugs at spuetz dot ath dot cx

    [url]http://mas.screenwork-dev.de/test.zip[/url]

    md5 hash is 5f681fa09b179d4763421ea724b3a207

    ------------------------------------------------------------------------

    [2007-01-25 00:21:27] [email]pajoyephp.net[/email]

    Can you provide a link to the "test.zip" archive please?

    Thanks,

    ------------------------------------------------------------------------

    [2007-01-25 00:19:26] php-bugs at spuetz dot ath dot cx

    It still doesn't work with:

    $ php -v
    PHP 5.2.1RC4-dev (cli) (built: Jan 25 2007 01:13:23)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

    ------------------------------------------------------------------------

    [2007-01-24 23:53:55] [email]tony2001php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]



    ------------------------------------------------------------------------

    [2007-01-24 23:50:22] php-bugs at spuetz dot ath dot cx

    Description:
    ------------
    I have a issue with extractTo(), it's not extracting empty directories.

    Reproduce code:
    ---------------
    $ mkdir -p test/empty
    $ zip -r test.zip test
    adding: test/ (stored 0%)
    adding: test/empty/ (stored 0%)
    $ rm -rf test
    $ php -r '$zip = new ZipArchive(); $zip->open("test.zip");
    $zip->extractTo("./");'


    Expected result:
    ----------------
    unzip works as expected:

    $ unzip test.zip
    Archive: test.zip
    creating: test/
    creating: test/empty/
    find
    ..
    ../test
    ../test/empty
    ../test.zip


    Actual result:
    --------------
    $ find
    ..
    ../test
    ../test.zip



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40228&edit=1[/url]
    tony2001@php.net Guest

  7. #7

    Default #40228 [Asn->Fbk]: extractTo not extracting empty directories

    ID: 40228
    Updated by: [email]pajoyephp.net[/email]
    Reported By: php-bugs at spuetz dot ath dot cx
    -Status: Assigned
    +Status: Feedback
    Bug Type: Zip Related
    Operating System: Linux
    PHP Version: 5.2.0
    Assigned To: pajoye
    New Comment:

    It is fixed in PECL CVS. I will merge into PHP as soon as possible.

    You can try the fix using the pecl cvs version. I will merge into PHP
    as soon as possible.


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-01-25 08:44:19] php-bugs at spuetz dot ath dot cx

    [url]http://mas.screenwork-dev.de/test.zip[/url]

    md5 hash is 5f681fa09b179d4763421ea724b3a207

    ------------------------------------------------------------------------

    [2007-01-25 00:21:27] [email]pajoyephp.net[/email]

    Can you provide a link to the "test.zip" archive please?

    Thanks,

    ------------------------------------------------------------------------

    [2007-01-25 00:19:26] php-bugs at spuetz dot ath dot cx

    It still doesn't work with:

    $ php -v
    PHP 5.2.1RC4-dev (cli) (built: Jan 25 2007 01:13:23)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

    ------------------------------------------------------------------------

    [2007-01-24 23:53:55] [email]tony2001php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]



    ------------------------------------------------------------------------

    [2007-01-24 23:50:22] php-bugs at spuetz dot ath dot cx

    Description:
    ------------
    I have a issue with extractTo(), it's not extracting empty directories.

    Reproduce code:
    ---------------
    $ mkdir -p test/empty
    $ zip -r test.zip test
    adding: test/ (stored 0%)
    adding: test/empty/ (stored 0%)
    $ rm -rf test
    $ php -r '$zip = new ZipArchive(); $zip->open("test.zip");
    $zip->extractTo("./");'


    Expected result:
    ----------------
    unzip works as expected:

    $ unzip test.zip
    Archive: test.zip
    creating: test/
    creating: test/empty/
    find
    ..
    ../test
    ../test/empty
    ../test.zip


    Actual result:
    --------------
    $ find
    ..
    ../test
    ../test.zip



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40228&edit=1[/url]
    pajoye@php.net Guest

  8. #8

    Default #40228 [Fbk]: extractTo not extracting empty directories

    ID: 40228
    Updated by: [email]pajoyephp.net[/email]
    Reported By: php-bugs at spuetz dot ath dot cx
    Status: Feedback
    Bug Type: Zip Related
    Operating System: Linux
    PHP Version: 5.2.0
    Assigned To: pajoye
    New Comment:

    Fixed in PECL release 1.8.5, waiting the OK from the RM to merge into
    5.2.1 (or .2).


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-01-28 02:54:19] [email]pajoyephp.net[/email]

    It is fixed in PECL CVS. I will merge into PHP as soon as possible.

    You can try the fix using the pecl cvs version. I will merge into PHP
    as soon as possible.

    ------------------------------------------------------------------------

    [2007-01-25 08:44:19] php-bugs at spuetz dot ath dot cx

    [url]http://mas.screenwork-dev.de/test.zip[/url]

    md5 hash is 5f681fa09b179d4763421ea724b3a207

    ------------------------------------------------------------------------

    [2007-01-25 00:21:27] [email]pajoyephp.net[/email]

    Can you provide a link to the "test.zip" archive please?

    Thanks,

    ------------------------------------------------------------------------

    [2007-01-25 00:19:26] php-bugs at spuetz dot ath dot cx

    It still doesn't work with:

    $ php -v
    PHP 5.2.1RC4-dev (cli) (built: Jan 25 2007 01:13:23)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

    ------------------------------------------------------------------------

    [2007-01-24 23:53:55] [email]tony2001php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]



    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/40228[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=40228&edit=1[/url]
    pajoye@php.net Guest

  9. #9

    Default #40228 [Fbk->Csd]: extractTo not extracting empty directories

    ID: 40228
    Updated by: [email]pajoyephp.net[/email]
    Reported By: php-bugs at spuetz dot ath dot cx
    -Status: Feedback
    +Status: Closed
    Bug Type: Zip Related
    Operating System: Linux
    PHP Version: 5.2.0
    Assigned To: pajoye
    New Comment:

    This bug has been fixed in CVS.

    Snapshots of the sources are packaged every three hours; this change
    will be in the next snapshot. You can grab the snapshot at
    [url]http://snaps.php.net/[/url].

    Thank you for the report, and for helping us make PHP better.




    Previous Comments:
    ------------------------------------------------------------------------

    [2007-01-29 03:18:52] [email]pajoyephp.net[/email]

    Fixed in PECL release 1.8.5, waiting the OK from the RM to merge into
    5.2.1 (or .2).

    ------------------------------------------------------------------------

    [2007-01-28 02:54:19] [email]pajoyephp.net[/email]

    It is fixed in PECL CVS. I will merge into PHP as soon as possible.

    You can try the fix using the pecl cvs version. I will merge into PHP
    as soon as possible.

    ------------------------------------------------------------------------

    [2007-01-25 08:44:19] php-bugs at spuetz dot ath dot cx

    [url]http://mas.screenwork-dev.de/test.zip[/url]

    md5 hash is 5f681fa09b179d4763421ea724b3a207

    ------------------------------------------------------------------------

    [2007-01-25 00:21:27] [email]pajoyephp.net[/email]

    Can you provide a link to the "test.zip" archive please?

    Thanks,

    ------------------------------------------------------------------------

    [2007-01-25 00:19:26] php-bugs at spuetz dot ath dot cx

    It still doesn't work with:

    $ php -v
    PHP 5.2.1RC4-dev (cli) (built: Jan 25 2007 01:13:23)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/40228[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=40228&edit=1[/url]
    pajoye@php.net Guest

Similar Threads

  1. #39458 [NEW]: ftp_nlist returns false on empty directories
    By brain at eucoders dot com in forum PHP Bugs
    Replies: 14
    Last Post: January 3rd, 10:48 PM
  2. #39537 [NEW]: extractTo(dest,file) method doesn't work
    By hscheidegger at zumbach dot ch in forum PHP Bugs
    Replies: 8
    Last Post: November 19th, 03:24 AM
  3. #39458 [Opn]: ftp_nlist returns false on empty directories
    By brain at eucoders dot com in forum PHP Bugs
    Replies: 1
    Last Post: November 10th, 12:07 PM
  4. Replies: 0
    Last Post: October 16th, 05:19 AM
  5. Replies: 2
    Last Post: July 30th, 07:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139