mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21892 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2216443596
commit
49d3f19860
@ -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"
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user