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
- Install latest 1.6.0 version.
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
- Migration script
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
- Thanks for testing!
Plan
- Priority: high
Assigned to: ThomasWaldmann
Status: this patch should fix it. needs testing on linux, tested ok on win32 platform. If tests fail, please reopen this bug and provide a traceback / problem report about the failure. If test does not fail, please provide positive feedback, too, and give the platform you tested it on.