}\r
}\r
\r
+ private boolean isValidFMU(File file) {\r
+ if(!file.exists()) return false;\r
+ if(!file.isFile()) return false;\r
+ if(file.length() == 0) return false;\r
+ return true;\r
+ }\r
+ \r
\r
@Override\r
public synchronized void simulate(final IModelicaMonitor monitor, final IProgressMonitor progressMonitor) throws IOException {\r
}\r
// Build the model and store previous model structure and inits that affect the building\r
// If there is no exe file OR the model structure has not changed, no need to build\r
- if (fmu == null && (!simulationLocation.executableFile.isFile() || sysdynModel.isStructureModified())) {\r
+ if (fmu == null && (!isValidFMU(simulationLocation.executableFile) || sysdynModel.isStructureModified())) {\r
progressMonitor.subTask("Build model");\r
buildModel(simulationLocation, monitor);\r
previousModelStructure = modelText;\r