diff --git a/src/ConverterCache.cpp b/src/ConverterCache.cpp index 813243f48b..335de9de24 100644 --- a/src/ConverterCache.cpp +++ b/src/ConverterCache.cpp @@ -287,8 +287,7 @@ void ConverterCache::add(FileName const & orig_from, string const & to_format, return; } item->checksum = checksum; - if (!mover.copy(converted_file, item->cache_name, - onlyFilename(item->cache_name.absFilename()))) { + if (!mover.copy(converted_file, item->cache_name)) { LYXERR(Debug::FILES, "Could not copy file " << orig_from << " to " << item->cache_name); } else if (!item->cache_name.changePermission(0600)) { @@ -298,8 +297,7 @@ void ConverterCache::add(FileName const & orig_from, string const & to_format, } else { CacheItem new_item(orig_from, to_format, timestamp, orig_from.checksum()); - if (mover.copy(converted_file, new_item.cache_name, - onlyFilename(new_item.cache_name.absFilename()))) { + if (mover.copy(converted_file, new_item.cache_name)) { if (!new_item.cache_name.changePermission(0600)) { LYXERR(Debug::FILES, "Could not change file mode" << new_item.cache_name); @@ -435,8 +433,7 @@ bool ConverterCache::copy(FileName const & orig_from, string const & to_format, CacheItem * const item = pimpl_->find(orig_from, to_format); LASSERT(item, /**/); Mover const & mover = getMover(to_format); - return mover.copy(item->cache_name, dest, - onlyFilename(dest.absFilename())); + return mover.copy(item->cache_name, dest); } } // namespace lyx diff --git a/src/Exporter.cpp b/src/Exporter.cpp index 8546b0a8ca..2c9e4e6e45 100644 --- a/src/Exporter.cpp +++ b/src/Exporter.cpp @@ -86,7 +86,7 @@ CopyStatus copyFile(string const & format, } Mover const & mover = getMover(format); - if (!mover.copy(sourceFile, destFile, latexFile)) + if (!mover.copy(sourceFile, destFile)) Alert::error(_("Couldn't copy file"), bformat(_("Copying %1$s to %2$s failed."), makeDisplayPath(sourceFile.absFilename()), diff --git a/src/Mover.cpp b/src/Mover.cpp index 81d13d2a5d..055c293f16 100644 --- a/src/Mover.cpp +++ b/src/Mover.cpp @@ -27,13 +27,6 @@ namespace lyx { bool Mover::copy(FileName const & from, FileName const & to) const -{ - return do_copy(from, to, to.absFilename()); -} - - -bool Mover::do_copy(FileName const & from, FileName const & to, - string const &) const { return from.copyTo(to); } @@ -57,7 +50,7 @@ bool SpecialisedMover::do_copy(FileName const & from, FileName const & to, string const & latex) const { if (command_.empty()) - return Mover::do_copy(from, to, latex); + return Mover::copy(from, to); string command = libScriptSearch(command_); command = subst(command, "$$i", quoteName(from.toFilesystemEncoding())); diff --git a/src/Mover.h b/src/Mover.h index 3f4585bb53..1cb9ce6f92 100644 --- a/src/Mover.h +++ b/src/Mover.h @@ -38,21 +38,6 @@ public: bool copy(support::FileName const & from, support::FileName const & to) const; - /** Copy file @c from to @c to. - * \see SpecialisedMover::SpecialisedMover() for an explanation of - * @c latex. - * This version should be used to copy files from the temporary - * directory to the export location, since @c to and @c latex may - * not be equal in this case. - * \returns true if successful. - */ - bool - copy(support::FileName const & from, support::FileName const & to, - std::string const & latex) const - { - return do_copy(from, to, latex); - } - /** Rename file @c from as @c to. * This version should be used to move files from the original * location to the temporary directory, since @c to and @c latex @@ -78,10 +63,6 @@ public: } protected: - virtual bool - do_copy(support::FileName const & from, support::FileName const & to, - std::string const &) const; - virtual bool do_rename(support::FileName const & from, support::FileName const & to, std::string const &) const;