mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
The original support::copy() was overwriting the target file by default. This commit put the code in line with pre-rev 22119 and 22129.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22148 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e1a2703a79
commit
77ac196f64
@ -35,7 +35,7 @@ bool Mover::copy(FileName const & from, FileName const & to) const
|
||||
bool Mover::do_copy(FileName const & from, FileName const & to,
|
||||
string const &) const
|
||||
{
|
||||
return from.copyTo(to);
|
||||
return from.copyTo(to, true);
|
||||
}
|
||||
|
||||
|
||||
|
@ -179,7 +179,7 @@ int InsetBibtex::latex(Buffer const & buffer, odocstream & os,
|
||||
FileName const out_file = makeAbsPath(database + ".bib",
|
||||
buffer.masterBuffer()->temppath());
|
||||
|
||||
bool const success = in_file.copyTo(out_file);
|
||||
bool const success = in_file.copyTo(out_file, true);
|
||||
if (!success) {
|
||||
lyxerr << "Failed to copy '" << in_file
|
||||
<< "' to '" << out_file << "'"
|
||||
@ -238,7 +238,7 @@ int InsetBibtex::latex(Buffer const & buffer, odocstream & os,
|
||||
base = removeExtension(in_file.mangledFilename());
|
||||
FileName const out_file(makeAbsPath(base + ".bst",
|
||||
buffer.masterBuffer()->temppath()));
|
||||
bool const success = in_file.copyTo(out_file);
|
||||
bool const success = in_file.copyTo(out_file, true);
|
||||
if (!success) {
|
||||
lyxerr << "Failed to copy '" << in_file
|
||||
<< "' to '" << out_file << "'"
|
||||
|
@ -475,7 +475,7 @@ int InsetInclude::latex(Buffer const & buffer, odocstream & os,
|
||||
unsigned long const checksum_out = writefile.checksum();
|
||||
|
||||
if (checksum_in != checksum_out) {
|
||||
if (!included_file.copyTo(writefile)) {
|
||||
if (!included_file.copyTo(writefile, true)) {
|
||||
// FIXME UNICODE
|
||||
LYXERR(Debug::LATEX,
|
||||
to_utf8(bformat(_("Could not copy the file\n%1$s\n"
|
||||
|
Loading…
Reference in New Issue
Block a user