mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
cdcb9b2cc0
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2005 a592a061-630c-0410-9148-cb99ea01b6c8
20 lines
332 B
C
20 lines
332 B
C
#include <config.h>
|
|
|
|
#include <cstdio>
|
|
|
|
#include "support/lyxlib.h"
|
|
|
|
bool lyx::rename(string const & from, string const & to)
|
|
{
|
|
#ifdef __EMX__
|
|
lyx::unlink(to.c_str());
|
|
#endif
|
|
if (::rename(from.c_str(), to.c_str()) == -1)
|
|
if (lyx::copy(from, to)) {
|
|
lyx::unlink(from);
|
|
return true;
|
|
} else
|
|
return false;
|
|
return true;
|
|
}
|