- FileTarget *ft;
- if(Target *tgt = builder.get_vfs().get_target(*i))
- ft = dynamic_cast<FileTarget *>(tgt);
- else
- ft = new File(builder, package, *i);
- inst->add_dependency(*copy.create_target(*ft, name));
+ Target *tgt = builder.get_vfs().get_target(*i);
+ if(!tgt)
+ tgt = new File(builder, package, *i);
+ inst->add_dependency(*copy.create_target(*tgt, name));