Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kucera2009-07-02 14:45:02 -0400
committerMike Kucera2009-07-02 14:45:02 -0400
commitcfb455de507602a19bb17787be1bb159a3b91e19 (patch)
tree10091339624fdc491d05b347533cfb818d53621f
parent4c9fa30f86318f2c00615018356cc1066a38fbe6 (diff)
downloadorg.eclipse.cdt-cfb455de507602a19bb17787be1bb159a3b91e19.tar.gz
org.eclipse.cdt-cfb455de507602a19bb17787be1bb159a3b91e19.tar.xz
org.eclipse.cdt-cfb455de507602a19bb17787be1bb159a3b91e19.zip
[282314] creating empty file in remote EFS project causes project contents to dissapear
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java12
1 files 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 24a55d7281..becbfc7391 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
@@ -648,18 +648,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) {

Back to the top