[ moin-Patches-875444 ] PageEditor _make_backup fails on Win32

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.web.wiki.moin.devel
Message-ID <[email protected]>
Patches item #875444, was opened at 2004-01-12 16:43
Message generated for change (Comment added) made by thomaswaldmann
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=308482&aid=875444&group_id=8482

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Kläger (tomy)
Assigned to: Nobody/Anonymous (nobody)
Summary: PageEditor _make_backup fails on Win32

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Thomas Waldmann (thomaswaldmann)
Date: 2004-03-27 15:49

Message:
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.


----------------------------------------------------------------------

Comment By: Johannes Berg (johill)
Date: 2004-03-10 14:30

Message:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=308482&aid=875444&group_id=8482


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.