Store the size of the project properly

This commit is contained in:
Ryan Cavanaugh 2017-03-21 11:37:22 -07:00
parent 456614f7e0
commit 16c7bcfebb

View file

@ -872,14 +872,14 @@ namespace ts.server {
continue;
}
totalNonTsFileSize += this.host.getFileSize(fileName);
if (totalNonTsFileSize > availableSpace) {
if (totalNonTsFileSize > maxProgramSizeForNonTsFiles) {
this.projectToSizeMap[name] = totalNonTsFileSize;
return true;
}
}
this.projectToSizeMap[name] = totalNonTsFileSize;
return false;
return totalNonTsFileSize < availableSpace;
}
private createAndAddExternalProject(projectFileName: string, files: protocol.ExternalFile[], options: protocol.ExternalProjectCompilerOptions, typeAcquisition: TypeAcquisition) {