1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-24 00:33:48 +02:00

[187571] Classification is empty for local directories

This commit is contained in:
Martin Oberhuber 2008-04-10 14:21:44 +00:00
parent ad6d96c018
commit bf869e9058

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2007 IBM Corporation and others.
* Copyright (c) 2006, 2008 IBM Corporation 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
@ -12,7 +12,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
* {Name} (company) - description of contribution.
* Martin Oberhuber (Wind River) - [187571] Classification is empty for local directories
*******************************************************************************/
package org.eclipse.rse.internal.subsystems.files.local.model;
@ -61,11 +61,15 @@ public class LocalFile extends AbstractRemoteFile implements IRemoteFile
public String getClassification() {
if (_classification == null && isFile())
{
if (_classification == null) {
if (isFile()) {
_classification = SystemFileClassifier.getInstance().classifyFile(getAbsolutePath());
} else if (isDirectory()) {
_classification = "directory"; //$NON-NLS-1$
} else {
_classification = "unknown"; //$NON-NLS-1$
}
}
return _classification;
}