cosmetics

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21892 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2007-12-01 00:12:03 +00:00
parent 2216443596
commit 49d3f19860
2 changed files with 5 additions and 12 deletions

View File

@ -43,8 +43,6 @@
#include "paragraph_funcs.h"
#include "ParagraphParameters.h"
#include "ParIterator.h"
#include "Server.h"
#include "ServerSocket.h"
#include "TextClass.h"
#include "TextMetrics.h"
#include "VSpace.h"

View File

@ -19,19 +19,14 @@
namespace lyx {
namespace support {
using std::string;
bool rename(FileName const & from, FileName const & to)
{
if (::rename(from.toFilesystemEncoding().c_str(), to.toFilesystemEncoding().c_str()) == -1) {
if (copy(from, to)) {
from.removeFile();
return true;
}
if (::rename(from.toFilesystemEncoding().c_str(),
to.toFilesystemEncoding().c_str()) != -1)
return true;
if (!copy(from, to))
return false;
}
from.removeFile();
return true;
}