{
const InstalledFile &install = dynamic_cast<const InstalledFile &>(target);
Worker *worker = new Worker(install);
- return new InternalTask(worker);
+ InternalTask *task = new InternalTask(worker);
+ task->add_file(install.get_path());
+ task->set_unlink();
+ return task;
}
const FileTarget &source = target.get_source();
const FS::Path &src_path = source.get_path();
const FS::Path &dst_path = target.get_path();
- FS::mkpath(FS::dirname(dst_path), 0755);
-
- // Remove old file. Not doing this would cause Bad Stuff when installing libraries.
- if(FS::exists(dst_path))
- {
- try
- {
- unlink(dst_path);
- }
- catch(const exception &e)
- {
- IO::print(IO::cerr, "%s\n", e.what());
- status = Task::ERROR;
- return;
- }
- }
try
{