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:
Abdelrazak Younes 2007-12-14 15:32:37 +00:00
parent e1a2703a79
commit 77ac196f64
3 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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 << "'"

View 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"