#include "Mover.h"
+#include "support/FileName.h"
#include "support/filetools.h"
#include "support/lstrings.h"
-#include "support/lyxlib.h"
#include "support/Systemcall.h"
#include <fstream>
bool Mover::copy(FileName const & from, FileName const & to) const
{
- return do_copy(from, to, to.absFilename());
+ return do_copy(from, to, to.absFileName());
}
bool Mover::do_copy(FileName const & from, FileName const & to,
string const &) const
{
- return from.copyTo(to, true);
+ return from.copyTo(to);
}
bool Mover::rename(FileName const & from,
FileName const & to) const
{
- return do_rename(from, to, to.absFilename());
+ return do_rename(from, to, to.absFileName());
}
bool Mover::do_rename(FileName const & from, FileName const & to,
string const &) const
{
- return from.renameTo(to);
+ return from.moveTo(to);
}
if (command_.empty())
return Mover::do_copy(from, to, latex);
- string command = libScriptSearch(command_);
+ string command = command_;
command = subst(command, "$$i", quoteName(from.toFilesystemEncoding()));
command = subst(command, "$$o", quoteName(to.toFilesystemEncoding()));
command = subst(command, "$$l", quoteName(latex));
+ command = subst(command, "$${python}", os::python());
Systemcall one;
return one.startscript(Systemcall::Wait, command) == 0;