diff options
Diffstat (limited to 'src/md/compiler/regmeta_emit.cpp')
-rw-r--r-- | src/md/compiler/regmeta_emit.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/md/compiler/regmeta_emit.cpp b/src/md/compiler/regmeta_emit.cpp index 33883107bd..22d2979343 100644 --- a/src/md/compiler/regmeta_emit.cpp +++ b/src/md/compiler/regmeta_emit.cpp @@ -67,17 +67,11 @@ STDMETHODIMP RegMeta::SetModuleProps( // S_OK or error. IfFailGo(m_pStgdb->m_MiniMd.GetModuleRecord(1, &pModule)); if (szName != NULL) { - WCHAR rcFile[_MAX_PATH]={0}; - WCHAR rcExt[_MAX_PATH]={0}; - WCHAR rcNewFileName[_MAX_PATH]={0}; + LPCWSTR szFile = NULL; + size_t cchFile; - // If the total name is less than _MAX_PATH, the components are, too. - if (wcslen(szName) >= _MAX_PATH) - IfFailGo(E_INVALIDARG); - - SplitPath(szName, NULL, 0, NULL, 0, rcFile, COUNTOF(rcFile), rcExt, COUNTOF(rcExt)); - MakePath(rcNewFileName, NULL, NULL, rcFile, rcExt); - IfFailGo(m_pStgdb->m_MiniMd.PutStringW(TBL_Module, ModuleRec::COL_Name, pModule, rcNewFileName)); + SplitPathInterior(szName, NULL, 0, NULL, 0, &szFile, &cchFile, NULL, 0); + IfFailGo(m_pStgdb->m_MiniMd.PutStringW(TBL_Module, ModuleRec::COL_Name, pModule, szFile)); } IfFailGo(UpdateENCLog(TokenFromRid(1, mdtModule))); |