Tool(b, "CP")
{ }
-Target *Copy::create_target(const list<Target *> &sources, const string &arg) const
+Target *Copy::create_target(const list<Target *> &sources, const string &arg)
{
FileTarget &file_tgt = dynamic_cast<FileTarget &>(*sources.front());
InstalledFile *inst = new InstalledFile(builder, *file_tgt.get_package(), file_tgt, arg);
if(!link.empty())
{
FS::Path relpath = FS::relative(dst_path, FS::dirname(link));
+ if(FS::exists(link))
+ FS::unlink(link);
symlink(relpath.str().c_str(), link.str().c_str());
}