1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-13 19:25:38 +02:00

[282314] creating empty file in remote EFS project causes project contents to dissapear

This commit is contained in:
Mike Kucera 2009-07-02 18:59:23 +00:00
parent b63af6b179
commit dde2c249e3

View file

@ -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("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) {