#include <fstream>
#include <sstream>
-
-namespace lyx {
-
using std::ios;
using std::string;
-Movers movers;
-Movers system_movers;
+namespace lyx {
+using support::quoteName;
bool Mover::copy(support::FileName const & from, support::FileName const & to,
unsigned long int mode) const
}
string command = support::libScriptSearch(command_);
- command = support::subst(command, "$$i", from.toFilesystemEncoding());
- command = support::subst(command, "$$o", to.toFilesystemEncoding());
- command = support::subst(command, "$$l", latex);
+ command = support::subst(command, "$$i", quoteName(from.toFilesystemEncoding()));
+ command = support::subst(command, "$$o", quoteName(to.toFilesystemEncoding()));
+ command = support::subst(command, "$$l", quoteName(latex));
support::Systemcall one;
return one.startscript(support::Systemcall::Wait, command) == 0;
Mover const & Movers::operator()(string const & fmt) const
{
SpecialsMap::const_iterator const it = specials_.find(fmt);
- return (it == specials_.end()) ? default_ : it->second;
+ if (it == specials_.end())
+ return default_;
+ return it->second;
}