Description

Some attached zip files to a wiki page may prevent from accessing the attachement page.

Steps to reproduce

  1. Create a zip file from a directory which includes some subdirectories (I experienced the problem with IZArc)
  2. Attach it to some Wiki page
  3. 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

Details

traceback.htm

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).

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.

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/ErrorOnAttachZipFileToAPageWhenSubdirectoriesAreInTheZipFile (last edited 2008-06-12 19:43:37 by ThomasWaldmann)