]> git.lyx.org Git - features.git/commitdiff
The original support::copy() was overwriting the target file by default. This commit...
authorAbdelrazak Younes <younes@lyx.org>
Fri, 14 Dec 2007 15:32:37 +0000 (15:32 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 14 Dec 2007 15:32:37 +0000 (15:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22148 a592a061-630c-0410-9148-cb99ea01b6c8

src/Mover.cpp
src/insets/InsetBibtex.cpp
src/insets/InsetInclude.cpp

index bdcf4e04bbf6afa394cd6faf00c0c80a2aa7249d..4837350830e3778e572221e6f9d82d2d300337fa 100644 (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);
 }
 
 
index 9f9d21398a5e1dbb7c95332a8ff3bec7d8b32d68..23be923ad0fce45cad36e13c6ae0db69708d280c 100644 (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 << "'"
index b6a4f0bc6d2756e2cf3dd8550a087ab62b547e55..a9838547151d6d6030a822d3beecb7dc1fcacbff 100644 (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"