[Xapian-devel] xapian-compact fails to rename iamflint.tmp for win32/cygwin builds

Patrick Mézard pmezard at gmail.com
Tue May 9 10:58:16 BST 2006


Hello,

Any call to xapian-compact compiled for Win32/Cygwin ultimately fails 
when it tries to rename/replace iamflint.tmp with the final version. The 
reason is you cannot rename an opened file with Win32/Cygwin libc.

To correct this, just close the output ofstream (xapian-compact.cc(534)) 
like:
"""
ofstream output(dest.c_str());
if (!output.write(buf, input.gcount())) {
	cerr << argv[0] << ": error writing '" << dest << "': "
	 << strerror(errno) << endl;
	exit(1);
}
output.close(); //Added
"""

Regards,

--
Patrick Mézard




More information about the Xapian-devel mailing list