summaryrefslogtreecommitdiff
path: root/indra/llvfs/lldir_win32.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-05-12 10:35:05 -0400
committerOz Linden <oz@lindenlab.com>2011-05-12 10:35:05 -0400
commite8810421252c6ff89d00b9a18fa6f118b4b5ac64 (patch)
tree0fa3705b3d2d4284c0caa02d198a028fedbbdadc /indra/llvfs/lldir_win32.cpp
parent6fcf9e4817a5c245f7779dd030b0ba75dab10e5e (diff)
parente213a36f703629dcfe27ed65ac1f66a5a5194b67 (diff)
merge changes for storm-477
Diffstat (limited to 'indra/llvfs/lldir_win32.cpp')
-rw-r--r--indra/llvfs/lldir_win32.cpp61
1 files changed, 0 insertions, 61 deletions
diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp
index 4e2a55f4b3..7709945123 100644
--- a/indra/llvfs/lldir_win32.cpp
+++ b/indra/llvfs/lldir_win32.cpp
@@ -240,67 +240,6 @@ U32 LLDir_Win32::countFilesInDir(const std::string &dirname, const std::string &
return (file_count);
}
-
-// get the next file in the directory
-BOOL LLDir_Win32::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
-{
- BOOL fileFound = FALSE;
- fname = "";
-
- WIN32_FIND_DATAW FileData;
- llutf16string pathname = utf8str_to_utf16str(dirname) + utf8str_to_utf16str(mask);
-
- if (pathname != mCurrentDir)
- {
- // different dir specified, close old search
- if (!mCurrentDir.empty())
- {
- FindClose(mDirSearch_h);
- }
- mCurrentDir = pathname;
-
- // and open new one
- // Check error opening Directory structure
- if ((mDirSearch_h = FindFirstFile(pathname.c_str(), &FileData)) != INVALID_HANDLE_VALUE)
- {
- fileFound = TRUE;
- }
- }
-
- // Loop to skip over the current (.) and parent (..) directory entries
- // (apparently returned in Win7 but not XP)
- do
- {
- if ( fileFound
- && ( (lstrcmp(FileData.cFileName, (LPCTSTR)TEXT(".")) == 0)
- ||(lstrcmp(FileData.cFileName, (LPCTSTR)TEXT("..")) == 0)
- )
- )
- {
- fileFound = FALSE;
- }
- } while ( mDirSearch_h != INVALID_HANDLE_VALUE
- && !fileFound
- && (fileFound = FindNextFile(mDirSearch_h, &FileData)
- )
- );
-
- if (!fileFound && GetLastError() == ERROR_NO_MORE_FILES)
- {
- // No more files, so reset to beginning of directory
- FindClose(mDirSearch_h);
- mCurrentDir[0] = '\000';
- }
-
- if (fileFound)
- {
- // convert from TCHAR to char
- fname = utf16str_to_utf8str(FileData.cFileName);
- }
-
- return fileFound;
-}
-
std::string LLDir_Win32::getCurPath()
{
WCHAR w_str[MAX_PATH];