From dde2c249e346553c4bfb949f6153a27684e9227a Mon Sep 17 00:00:00 2001 From: Mike Kucera Date: Thu, 2 Jul 2009 18:59:23 +0000 Subject: [PATCH] [282314] creating empty file in remote EFS project causes project contents to dissapear --- .../cdt/internal/core/model/CModelManager.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 8e37b1bb659..7013b75d991 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 @@ -651,18 +651,22 @@ public class CModelManager implements IResourceChangeListener, ICDescriptorListe } } + URI fileUri = file.getLocationURI(); //Avoid name special devices, empty files and the like - if (! Util.isNonZeroLengthFile(file.getLocationURI())) { + if (! Util.isNonZeroLengthFile(fileUri)) { // PR:xxx the EFS does not seem to work for newly created file // so before bailing out give another try? //Avoid name special devices, empty files and the like - File f = new File(file.getLocationURI()); - if (f.length() == 0) { - return null; + if("file".equals(fileUri.getScheme())) { //$NON-NLS-1$ + File f = new File(fileUri); + if (f.length() == 0) { + return null; + } } //return null; } + int hints = 0; for (BinaryParserConfig parser2 : parsers) {