summaryrefslogtreecommitdiff
path: root/src/md/ceefilegen
diff options
context:
space:
mode:
Diffstat (limited to 'src/md/ceefilegen')
-rw-r--r--src/md/ceefilegen/cceegen.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/md/ceefilegen/cceegen.cpp b/src/md/ceefilegen/cceegen.cpp
index 268093cd6b..0cf0780d15 100644
--- a/src/md/ceefilegen/cceegen.cpp
+++ b/src/md/ceefilegen/cceegen.cpp
@@ -572,18 +572,20 @@ HRESULT CCeeGen::emitMetaData(IMetaDataEmit *emitter, CeeSection* section, DWORD
_ASSERTE(metaDataLen <= buffLen);
#ifdef ENC_DELTA_HACK
- extern int __cdecl fclose(FILE *);
- WCHAR szFileName[256];
- DWORD len = GetEnvironmentVariable(W("COMP_ENC_EMIT"), szFileName, ARRAYSIZE(szFileName));
- _ASSERTE(len < (ARRAYSIZE(szFileName) + 6)); // +6 for the .dmeta
- if (len > 0 && len < (ARRAYSIZE(szFileName) + 6))
{
- wcscat_s(szFileName, ARRAYSIZE(szFileName), W(".dmeta"));
- FILE *pDelta;
- int ec = _wfopen_s(&pDelta, szFileName, W("wb"));
- if (FAILED(ec)) { return HRESULT_FROM_WIN32(ERROR_OPEN_FAILED); }
- fwrite(buffer, 1, metaDataLen, pDelta);
- fclose(pDelta);
+ extern int __cdecl fclose(FILE *);
+ WCHAR szFileName[256];
+ DWORD len = GetEnvironmentVariable(W("COMP_ENC_EMIT"), szFileName, ARRAYSIZE(szFileName));
+ _ASSERTE(len < (ARRAYSIZE(szFileName) + 6)); // +6 for the .dmeta
+ if (len > 0 && len < (ARRAYSIZE(szFileName) + 6))
+ {
+ wcscat_s(szFileName, ARRAYSIZE(szFileName), W(".dmeta"));
+ FILE *pDelta;
+ int ec = _wfopen_s(&pDelta, szFileName, W("wb"));
+ if (FAILED(ec)) { return HRESULT_FROM_WIN32(ERROR_OPEN_FAILED); }
+ fwrite(buffer, 1, metaDataLen, pDelta);
+ fclose(pDelta);
+ }
}
#endif