- return Mover::do_copy(from, to, latex, mode);
-
- if (mode != (unsigned long int)-1) {
- std::ofstream ofs(to.toFilesystemEncoding().c_str(), ios::binary | ios::out | ios::trunc);
- if (!ofs)
- return false;
- ofs.close();
- if (!support::chmod(to, mode))
- return false;
- }
-
- string command = support::libScriptSearch(command_);
- 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;
+ return Mover::do_copy(from, to, latex);
+
+ string command = libScriptSearch(command_);
+ command = subst(command, "$$i", quoteName(from.toFilesystemEncoding()));
+ command = subst(command, "$$o", quoteName(to.toFilesystemEncoding()));
+ command = subst(command, "$$l", quoteName(latex));
+
+ Systemcall one;
+ return one.startscript(Systemcall::Wait, command) == 0;