View | Details | Raw Unified | Return to bug 364027
Collapse All | Expand All

(-)a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java (-4 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 QNX Software Systems and others.
2
 * Copyright (c) 2000, 2012 QNX Software Systems and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 633-642 Link Here
633
			return null;
633
			return null;
634
		}
634
		}
635
635
636
		// Only if file has no extension, has an extension that is an integer
636
		// Only if:
637
		// or is a binary file content type
637
		// - file has no extension or
638
		// - has an extension that is an integer or
639
		// - is a binary file content type or 
640
		// - file name is equal to the project name (in case it contains a dot, see bug 364027)
641
		
638
		String ext = file.getFileExtension();
642
		String ext = file.getFileExtension();
639
		if (ext != null && ext.length() > 0) {
643
		boolean equalNames = file.getName().equals(file.getProject().getName());
644
		if (!equalNames && ext != null && ext.length() > 0) {
640
			// shared libraries often have a version number
645
			// shared libraries often have a version number
641
			// strip version extension: libc.so.3.2.1 -> libc.so
646
			// strip version extension: libc.so.3.2.1 -> libc.so
642
			IPath baseFileName = new Path(file.getName());
647
			IPath baseFileName = new Path(file.getName());

Return to bug 364027