From 36c90dafd6ff514919b802ccb54404b882afc944 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 22 Dec 2022 16:22:22 +0200 Subject: [PATCH] Remove redundant task setup from Copy FileTarget already does this --- source/copy.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/copy.cpp b/source/copy.cpp index 31e6210..9bca33f 100644 --- a/source/copy.cpp +++ b/source/copy.cpp @@ -26,10 +26,7 @@ Target *Copy::create_target(const vector &sources, const string &arg) Task *Copy::run(const Target &target) const { const InstalledFile &install = dynamic_cast(target); - InternalTask *task = new InternalTask([&install]{ return _run(install); }); - task->add_file(install.get_path()); - task->set_unlink(); - return task; + return new InternalTask([&install]{ return _run(install); }); } bool Copy::_run(const InstalledFile &install) -- 2.45.2