Description

Migrating a 1.5.8 wiki to the latest 1.6.0 development version and 1.6.0 Beta 1 causes attachments to be significantly truncated and corrupted.

Steps to reproduce

  1. Install latest 1.6.0 version.
  2. Run the appropriate moin --config-dir=/path/to/config_dir --wiki-url=wiki.example.org/ migration data  command

Example

One migrated JPG attachment went from 16962 bytes to 281 bytes. Every binary attachment appears to be affected (don't know about text attachments).

Component selection

Details

MoinMoin Version

1.6.0 Development Version / 1.6.0 Beta 1

OS and Version

Windows XP and Windows XP 64-bit

Python Version

2.5.1

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

English

Workaround

Might be able to restore all the attachments from 1.5.8 wiki backup.

Discussion

migutil.copy_file does not use binary mode (works on Linux, broken on Windows). Should get fixed to either use binary mode or even better wrap some python stdlib file copy function (check that lib function also). Also fix memory consumption of that function for big files.

Supplied patch is effective for Windows XP (32 and 64 bit). --JohnCarlson 2007-11-25 03:30:31

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/1.6MigrationCorruptsAttachments (last edited 2007-11-25 08:52:47 by ThomasWaldmann)