Avoid duplicates in vcs roots

The project is often a module, i.e. its root is added as project base dir.
=> check for duplicates when adding a content root.
This commit is contained in:
Kirill Likhodedov
2012-03-11 18:58:30 +04:00
parent 10e4d90eb7
commit 3122cc31d7
@@ -86,7 +86,7 @@ public class ModuleDefaultVcsRootPolicy extends DefaultVcsRootPolicy {
// explicitly (we know it anyway)
VcsDirectoryMapping mapping = mappingList.getMappingFor(file, module);
final String mappingVcs = mapping != null ? mapping.getVcs() : null;
if (vcsName.equals(mappingVcs)) {
if (vcsName.equals(mappingVcs) && !result.contains(file)) {
result.add(file);
}
}