@@ -305,12 +305,6 @@ HRESULT CLiteWeightStgdbRW::OpenForRead(
305305 if (!szDatabase)
306306 szDatabase = pNoFile;
307307
308- // Sanity check the name lentgh.
309- if (!IsValidFileNameLength (szDatabase))
310- {
311- IfFailGo (E_INVALIDARG);
312- }
313-
314308 // If we have storage to work with, init it and get type.
315309 if (*szDatabase || pbData)
316310 {
@@ -409,16 +403,6 @@ HRESULT CLiteWeightStgdbRW::OpenForRead(
409403 // Save off everything.
410404 IfFailGo (SetFileName (szDatabase));
411405
412- // If this was a file...
413- if (pbData == NULL )
414- {
415- WIN32_FILE_ATTRIBUTE_DATA faData;
416- if (!WszGetFileAttributesEx (szDatabase, GetFileExInfoStandard, &faData))
417- IfFailGo (E_FAIL);
418- m_dwDatabaseLFS = faData.nFileSizeLow ;
419- m_dwDatabaseLFT = faData.ftLastWriteTime .dwLowDateTime ;
420- }
421-
422406ErrExit:
423407 if (SUCCEEDED (hr))
424408 {
@@ -922,12 +906,6 @@ HRESULT CLiteWeightStgdbRW::Save(
922906 IfFailGo (SetFileName (szDatabase));
923907 }
924908
925- // Sanity check the name.
926- if (!IsValidFileNameLength (m_wszFileName))
927- {
928- IfFailGo (E_INVALIDARG);
929- }
930-
931909 m_eFileType = FILETYPE_CLB;
932910
933911 // Allocate a new storage object.
@@ -1177,15 +1155,3 @@ CLiteWeightStgdbRW::SetFileName(
11771155ErrExit:
11781156 return hr;
11791157} // CLiteWeightStgdbRW::SetFileName
1180-
1181- // =======================================================================================
1182- //
1183- // Returns TRUE if wszFileName has valid path length (MAX_PATH or 32767 if prefixed with \\?\).
1184- //
1185- // static
1186- BOOL
1187- CLiteWeightStgdbRW::IsValidFileNameLength (
1188- const WCHAR * wszFileName)
1189- {
1190- return TRUE ;
1191- } // CLiteWeightStgdbRW::IsValidFileNameLength
0 commit comments