[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#5774) Modifications not saved on file by back-ldif (on Windows)



emmanuel.duru@atosorigin.com wrote:
> Full_Name: Emmanuel Duru
> Version: 2.4.11
> OS: Windows
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (80.78.0.137)
>
>
> On Windows, modifications are not saved on file by back-ldif.
> This is the case for example with cn=config.
>
> Reading back-ldif code I see that when modifying an entry, back-ldif creates a
> temporary file containing the modified entry, and then renames the temporary
> file to the entry file.
> On Windows, renaming a file to an already existing file does not work, it gets
> an ERROR_ALREADY_EXISTS error (183), error code which is ignored by back-ldif.
>
>
>
I guess we should be using #ifdef _WIN32 / ReplaceFile instead of rename() in 
this case.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/