Description
Some attached zip files to a wiki page may prevent from accessing the attachement page.
Steps to reproduce
- Create a zip file from a directory which includes some subdirectories (I experienced the problem with IZArc)
- Attach it to some Wiki page
- Try to attach another file. You should get an error like this:
File name in directory "TD01GIS\Correction.doc" and header "TD01GIS/Correction.doc" differ.
Example
Component selection
- general
Details
MoinMoin Version |
1.5.6 and 1.6.3 |
OS and Version |
Linux |
Python Version |
2.4.1 and 2.4.4 |
Server Setup |
|
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
Obviously a workaround is not to attach zip files with subdirectories.
Discussion
There won't be fixes for 1.5.x any more.
Can you reproduce the problem here (this wiki runs on current 1.6.x, maybe soon on 1.7.x)?
I just did it, and the problem is there also (we cannot view the list of attachements any more; we can still add attachements on this version, which is already better than with 1.5).
- Thanks!
Looks like a bug in zipfile stdlib module. Should be checked if it happens with Python 2.5.x.
Looks to me like the zip file is corrupted:
~/Test$ unzip TestWiki.zip Archive: TestWiki.zip tmp\Correction.doc: mismatching "local" filename (tmp/Correction.doc), continuing with "central" filename version warning: TestWiki.zip appears to use backslashes as path separators inflating: tmp/Correction.doc tmp\correctionTD1.pdf: mismatching "local" filename (tmp/correctionTD1.pdf), continuing with "central" filename version inflating: tmp/correctionTD1.pdf tmp\Data\Annot_contacts.pl: mismatching "local" filename (tmp/Data/Annot_contacts.pl), continuing with "central" filename version inflating: tmp/Data/Annot_contacts.pl tmp\Data\Annot_raster.vo: mismatching "local" filename (tmp/Data/Annot_raster.vo), continuing with "central" filename version inflating: tmp/Data/Annot_raster.vo tmp\Data\Annot_topo.mx: mismatching "local" filename (tmp/Data/Annot_topo.mx), continuing with "central" filename version inflating: tmp/Data/Annot_topo.mx tmp\Data\southbay_map.jpg: mismatching "local" filename (tmp/Data/southbay_map.jpg), continuing with "central" filename version inflating: tmp/Data/southbay_map.jpg
The python 2.5.1 zipfile can list it correctly. If the zip file would be not corrupted then you can't unpack this one because you do have data stored in different dirs. btw. how do you have created this file -- ReimarBauer 2008-05-23 16:56:27
I used IZArc on Windows (right click on a directory). It's the first time I have problems with IZArc.
seems to be a known issue already see http://www.izarc.org/forum/viewtopic.php?t=1436 The definition of the format is described at http://www.pkware.com/documents/casestudies/APPNOTE.TXT
file name: (Variable)
- The name of the file, with optional relative path. The path stored should not contain a drive or device letter, or a leading slash. All slashes should be forward slashes '/' as opposed to backwards slashes '\' for compatibility with Amiga and UNIX file systems etc. ...
Plan
- Priority:
- Assigned to:
Status: zip file is not conforming zip standard, stdlib zipfile.py falls over that -> not a moin problem. The only thing we can do is handle exceptions in those parts of the code differently so that a corrupt zip does not get a major usability problem on the attachments page.