]> git.tdb.fi Git - builder.git/blobdiff - source/target.cpp
Make Target::build virtual and move the unlink call to FileTarget
[builder.git] / source / target.cpp
index b0273e9ff535d9a5a80d0d6ecee5948245298b8c..cf4fae93d2aa3c851ea54627f4ec124fd3864ac4 100644 (file)
@@ -115,11 +115,6 @@ Task *Target::build()
                return 0;
        }
 
-       // XXX Minor breach of OO here
-       if(FileTarget *ft = dynamic_cast<FileTarget *>(this))
-               if(!builder.get_dry_run() && FS::exists(ft->get_path()))
-                       FS::unlink(ft->get_path());
-
        Task *task = tool->run(*this);
        task->signal_finished.connect(sigc::mem_fun(this, &Target::build_finished));
        state = BUILDING;