Extracting zip files causes multiple empty folders to appear

Bug #788882 reported by Hugh Davenport
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Robert Lyon
1.5
Fix Released
Low
Unassigned
1.6
Fix Released
Low
Unassigned
1.7
Fix Released
Low
Unassigned

Bug Description

When I extract a zip file (attached) with multiple files in
subdirectories, the outcome is that multiple empty folders are created,
and some files are placed in the root directory instead of subfolders.

There is also a log (also attached) which happens when the 2nd
screenshot is displayed (extract-finished.png)

There are a few screenshots attached.

extract-start.png shows the files it plans to extract
extract-finish.png shows the finish screen (there were also error logs
for this step)

extract-after.png (folder displayed directly after clicking "Continue")
extract-fisrt-folder.png (first folder in that directory listing, empty
(same with every folder except the 2nd (not always 2nd in subsequent
tries :P))
extract-in-second-folder.png (in the second folder, seems to have the
files, but all the folders within are empty)
extract-in-subfolder.png (showing emptyness of the subfolder, all are
the same)
extract-in-home-folder.png (more copys of empty folders (won't bother
with screenshots, and also all the missing files from the subdirectories)

Tags: zip
Revision history for this message
Hugh Davenport (hugh-davenport) wrote :
Revision history for this message
Hugh Davenport (hugh-davenport) wrote :

doesn't happen with tarballs, they work as expected, just zips

Changed in mahara:
importance: Undecided → Low
status: New → Triaged
tags: added: zip
description: updated
Revision history for this message
Robert Lyon (rlyon) wrote :
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/2076
Committed: http://gitorious.org/mahara/mahara/commit/45590e30ba11e21d5203ab46f06164972ce15e39
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 45590e30ba11e21d5203ab46f06164972ce15e39
Author: rlyon <email address hidden>
Date: Mon Apr 22 10:20:35 2013 +1200

Fix to allow decompression of zip files with subdirectories (Bug #788882)

For zip decompression with subdirectories the folders are created first
then the files added later so needed to get any child subfolders to be added
to their correct parent folder.
Also needed to correctly check if folder existed to stop making extra
empty folders.

Change-Id: Ie6c5b8d130488914542a46cfcf355ee00785fb14
Signed-off-by: rlyon <email address hidden>

Aaron Wells (u-aaronw)
Changed in mahara:
status: Triaged → Fix Committed
Changed in mahara:
milestone: none → 1.8.0rc1
assignee: nobody → Robert Lyon (rlyon)
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/2121
Committed: http://gitorious.org/mahara/mahara/commit/53b6a098cf595fdc207b9824f7db3d576289fde9
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.7_STABLE

commit 53b6a098cf595fdc207b9824f7db3d576289fde9
Author: rlyon <email address hidden>
Date: Mon Apr 22 10:20:35 2013 +1200

Fix to allow decompression of zip files with subdirectories (Bug #788882)

For zip decompression with subdirectories the folders are created first
then the files added later so needed to get any child subfolders to be added
to their correct parent folder.
Also needed to correctly check if folder existed to stop making extra
empty folders.

Change-Id: Ie6c5b8d130488914542a46cfcf355ee00785fb14
Signed-off-by: rlyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/2122
Committed: http://gitorious.org/mahara/mahara/commit/65e17c7fe86c29f00ec130e1a6c15645e6f8d4cb
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.6_STABLE

commit 65e17c7fe86c29f00ec130e1a6c15645e6f8d4cb
Author: rlyon <email address hidden>
Date: Mon Apr 22 10:20:35 2013 +1200

Fix to allow decompression of zip files with subdirectories (Bug #788882)

For zip decompression with subdirectories the folders are created first
then the files added later so needed to get any child subfolders to be added
to their correct parent folder.
Also needed to correctly check if folder existed to stop making extra
empty folders.

Change-Id: Ie6c5b8d130488914542a46cfcf355ee00785fb14
Signed-off-by: rlyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/2123
Committed: http://gitorious.org/mahara/mahara/commit/8d9699c949fca76bd4886e802e58d6651b5dd745
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.5_STABLE

commit 8d9699c949fca76bd4886e802e58d6651b5dd745
Author: rlyon <email address hidden>
Date: Mon Apr 22 10:20:35 2013 +1200

Fix to allow decompression of zip files with subdirectories (Bug #788882)

For zip decompression with subdirectories the folders are created first
then the files added later so needed to get any child subfolders to be added
to their correct parent folder.
Also needed to correctly check if folder existed to stop making extra
empty folders.

Change-Id: Ie6c5b8d130488914542a46cfcf355ee00785fb14
Signed-off-by: rlyon <email address hidden>

Revision history for this message
Aaron Wells (u-aaronw) wrote :
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8.0rc1 → none
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.