mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
PR:170136
EFS for newly discovered file return length zero. Fall back to java.io.file
This commit is contained in:
parent
b27b8766ae
commit
ce9cf841bd
1 changed files with 10 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
|||
|
||||
package org.eclipse.cdt.internal.core.model;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
|
@ -565,8 +566,16 @@ public class CModelManager implements IResourceChangeListener, ICDescriptorListe
|
|||
public IBinaryFile createBinaryFile(IFile file) {
|
||||
//Avoid name special devices, empty files and the like
|
||||
if (! Util.isNonZeroLengthFile(file.getLocationURI())) {
|
||||
return null;
|
||||
// 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;
|
||||
}
|
||||
//return null;
|
||||
}
|
||||
|
||||
BinaryParserConfig[] parsers = getBinaryParser(file.getProject());
|
||||
int hints = 0;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue