Comment 1 for bug 536189

Revision history for this message
Timowi (timo-wingender) wrote :

This is a annoying bug. This affects every zipped file; savegames and maps.

The problem is the redundancy in the zip files: the directory name is saved in the filename and as the folder name inside the zip. How should this be fixed? Which string should be taken? How should new zip files saved?

I think the cleanest solution is to store the content directly in the root of zip files and only take the zip file name as path. For old files the first directory must be stripped away then. This throws the redundancy away completely and this is the way how most zip files are (as far as I know). But this has one disadvantage: Files saved with releases after the change cannot be opened with versions before the change.

A dirty but more compatible solutions is to keep the structure as it is but ignore the directory name while reading zip files. I personally do not like the idea of saving this redundancy just to ignore it later.

I solution in between could be to implement the reading changes first (possibility to load files with directory name or files with content in the root of the zip) and change the storing functions one or two releases later.

opinions?