Download zip file of home folder, can't be extracted in Windows

Bug #1437083 reported by Bernard Neary
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Son Nguyen
1.10
Fix Released
Medium
Unassigned
15.04
Fix Released
Medium
Unassigned
15.10
Fix Released
Medium
Son Nguyen

Bug Description

Version: 15.04rc1

OS: Windows 7
Browser: Firefox 36.0.4

If download zip file of home (parent) folder, error message displayed when try to extract zipped folder. Try this with sub folders (child folders) seems to work fine.

1. In Mahara, click Content > Files
2. Click 'Download folder content as a zip file'
3. On downloaded zipped folder right-click and select 'Extract All...' then click the 'Extract' button
4. Error message displayed (attached)

Revision history for this message
Bernard Neary (bneary) wrote :
Revision history for this message
Robert Lyon (robertl-9) wrote :

Hi Bernard

Hmm, I've tried to replicate and have not being able to. Can you let me know the program you use to try and unzip the compressed file and what version it is?

Cheers

Robert

Changed in mahara:
status: New → Incomplete
Revision history for this message
Bernard Neary (bneary) wrote :

Hi Robert,

I'm using the built in Windows extraction functionality; I've tried two computers (both Windows7) and the same error occurs on both. Its just happening on the home folder though.

Thanks.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Hi Bernard,

What web server software are you using? Is that on Windows as well?

I'll try to test this bug out tomorrow on our Windows test laptop at Mahara HQ.

Cheers,
Aaron

Changed in mahara:
status: Incomplete → Triaged
milestone: none → 15.04.1
Revision history for this message
Bernard Neary (bneary) wrote :

Hi Aaron,

I was using the Mahara test instance:
http://master.dev.mahara.org/

Thanks

Revision history for this message
Aaron Wells (u-aaronw) wrote :

I confirmed this as well.

Test prodedure:

1. Clean Mahara install
2. Go to Content -> Files
3. Upload a file into the top level of your files area
4. Click "Download folder content as a zip file"
5. Try to open it with Windows' built-in zip handler (i.e. tell the browser to open it, or right-click and select "Extract all")

Expected result: The zip file should unzip with the single file in it
Actual result: The zip file opens up and appears empty, or you get an "Invalid file" message

A few more details:
- The top-level zip file worked fine in Linux, and WinRar
- The built-in Windows zip extractor works fine for other Mahara folders downloaded as zip. It's only the top-level one that causes problems.

Changed in mahara:
status: Triaged → Confirmed
Revision history for this message
Aaron Wells (u-aaronw) wrote :

It also the same problem if I follow the test procedure on my Linux desktop, take the zip file on a thumb drive, and try to open it in Windows.

If I take that zip file that doesn't work in Windows, unzip it in Linux, and then re-zip it in Linux so that I have a new zip file with exactly the same contents, *that* one works in Windows.

So it's something in the format of our zip files for zips of the top-level file directory, as we generate them in PHP. I ran "zip -T" on one of these, and it didn't detect any problems.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Ah, I see the problem.

aaronw@vegas:~/Downloads$ unzip -l folder-home.zip
Archive: folder-home.zip
  Length Date Time Name
--------- ---------- ----- ----
    17977 2015-04-16 13:50 /pikachu.jpg
--------- -------
    17977 1 file
aaronw@vegas:~/Downloads$ unzip -l pikachu.jpg.zip
Archive: pikachu.jpg.zip
  Length Date Time Name
--------- ---------- ----- ----
    17977 2015-04-16 13:50 pikachu.jpg
--------- -------
    17977 1 file

We're generating the name of the file as "/pikachu.jpg". Linux can deal with this, but Windows cannot.

tags: added: behat behat-needed
Aaron Wells (u-aaronw)
tags: added: snack-sized
Aaron Wells (u-aaronw)
summary: - Files - Download folder content as a zip file
+ Download zip file of home folder, can't be extracted in Windows
tags: added: windows zip
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5233

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5233
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/27f1a5f2a77ff2492579a4468a855de535c89cc1
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit 27f1a5f2a77ff2492579a4468a855de535c89cc1
Author: Son Nguyen <email address hidden>
Date: Tue Sep 8 12:47:45 2015 +1200

Remove the top '/' when downloading the home folder. Bug 1437083

behatnotneeded

Change-Id: I12f3be46df1042a77f719be9ae8dcec535f3959a

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/5452

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

Patch for "1.10_STABLE" branch: https://reviews.mahara.org/5453

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5453
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/d227b1abce39e925d9671cd172750c59bbe6e05b
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit d227b1abce39e925d9671cd172750c59bbe6e05b
Author: Son Nguyen <email address hidden>
Date: Tue Sep 8 12:47:45 2015 +1200

Remove the top '/' when downloading the home folder. Bug 1437083

behatnotneeded

Change-Id: I12f3be46df1042a77f719be9ae8dcec535f3959a
(cherry picked from commit 27f1a5f2a77ff2492579a4468a855de535c89cc1)

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

Reviewed: https://reviews.mahara.org/5452
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/2a4d41aa44f8f81f4b41b9c7be685a7cd889dd6b
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit 2a4d41aa44f8f81f4b41b9c7be685a7cd889dd6b
Author: Son Nguyen <email address hidden>
Date: Tue Sep 8 12:47:45 2015 +1200

Remove the top '/' when downloading the home folder. Bug 1437083

behatnotneeded

Change-Id: I12f3be46df1042a77f719be9ae8dcec535f3959a
(cherry picked from commit 27f1a5f2a77ff2492579a4468a855de535c89cc1)

Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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