From 785bb194045475a76bcdca56fa53cd082a0bc018 Sun, 15 Jan 2012 21:57:48 -0500 From: Marc-Andre Laperle Date: Fri, 13 Jan 2012 23:56:56 -0500 Subject: [PATCH] Bug 364027 - It can't find "binary" if you put any dot in the project name diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java index 6cb6cd4..815e7f1 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 QNX Software Systems and others. + * Copyright (c) 2000, 2012 QNX Software Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -633,10 +633,15 @@ return null; } - // Only if file has no extension, has an extension that is an integer - // or is a binary file content type + // Only if: + // - file has no extension or + // - has an extension that is an integer or + // - is a binary file content type or + // - file name is equal to the project name (in case it contains a dot, see bug 364027) + String ext = file.getFileExtension(); - if (ext != null && ext.length() > 0) { + boolean equalNames = file.getName().equals(file.getProject().getName()); + if (!equalNames && ext != null && ext.length() > 0) { // shared libraries often have a version number // strip version extension: libc.so.3.2.1 -> libc.so IPath baseFileName = new Path(file.getName());