From 77ac196f64a69451fd863b954f33e5556fd95ba6 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Fri, 14 Dec 2007 15:32:37 +0000 Subject: [PATCH] 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 --- src/Mover.cpp | 2 +- src/insets/InsetBibtex.cpp | 4 ++-- src/insets/InsetInclude.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mover.cpp b/src/Mover.cpp index bdcf4e04bb..4837350830 100644 --- a/src/Mover.cpp +++ b/src/Mover.cpp @@ -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); } diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp index 9f9d21398a..23be923ad0 100644 --- a/src/insets/InsetBibtex.cpp +++ b/src/insets/InsetBibtex.cpp @@ -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 << "'" diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index b6a4f0bc6d..a983854715 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -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"