#28 PageEditor _make_backup fails on Win32

closed
nobody
None
5
2004-04-04
2004-01-12
No

Using MoinMoin on Win32:

While editing a page, if you preview your changes and
then additionally try the spell checker you get an
"OSError: [Errno 17] File exists".

The problem is that on win32 os.rename does not
overwrite a file if it already exists.

To attached patch corrects this by removing the old file
on win32 before renaming.

Discussion

  • Thomas Kläger

    Thomas Kläger - 2004-01-12

    Remove old file before renaming

     
  • Johannes Berg

    Johannes Berg - 2004-03-10

    Logged In: YES
    user_id=32619

    On Windows NT the python function could use MoveFileEx with some flags to get overwrite behaviour, this is not supported on 9x/ME though.

     
  • Thomas Waldmann

    Thomas Waldmann - 2004-03-27

    Logged In: YES
    user_id=100649

    I would like to have a TESTED patch that:
    * fixes ALL places were os.rename is used
    * replaces those calls with a call to
    MoinMoin.util.filesys.rename that handles platform specific
    stuff as good as possible (and just calls os.rename for
    every non-broken OS)

    The patch should be based on latest 1.2.x release or 1.3
    devel version.

    As I can't test it, I can't fix it.

     
  • Thomas Waldmann

    Thomas Waldmann - 2004-04-04
    • status: open --> closed
     
  • Thomas Waldmann

    Thomas Waldmann - 2004-04-04

    Logged In: YES
    user_id=100649

    implemented MoinMoin.util.filesys.rename to fix that

    the fix is in moin--main--1.2 tla branch

    need testers as I don't have windows

    if it is still broken, reopen this item

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks