From 4fa6500b5107f9d300a6ab7b6f011fb19621b05c Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Thu, 28 Oct 2010 18:09:09 -0400
Subject: [PATCH] STORM-480 remove unused "wrap" parameter from
 LLDir::getNetFileInDir

--HG--
branch : storm-102
---
 .../llui_libtest/llui_libtest.cpp              |  2 +-
 indra/linux_updater/linux_updater.cpp          |  2 +-
 indra/llvfs/lldir.cpp                          |  2 +-
 indra/llvfs/lldir.h                            |  3 +--
 indra/llvfs/lldir_linux.cpp                    |  9 +--------
 indra/llvfs/lldir_linux.h                      |  2 +-
 indra/llvfs/lldir_mac.cpp                      |  8 +-------
 indra/llvfs/lldir_mac.h                        |  2 +-
 indra/llvfs/lldir_solaris.cpp                  |  9 +--------
 indra/llvfs/lldir_solaris.h                    |  2 +-
 indra/llvfs/lldir_win32.cpp                    | 18 +++++-------------
 indra/llvfs/lldir_win32.h                      |  2 +-
 indra/llvfs/tests/lldir_test.cpp               |  8 ++++----
 indra/newview/llappviewer.cpp                  |  4 ++--
 indra/newview/llappviewerlinux.cpp             |  3 +--
 indra/newview/llfloateruipreview.cpp           | 12 ++++++------
 indra/newview/llviewermedia.cpp                |  2 +-
 indra/newview/llwaterparammanager.cpp          |  4 ++--
 indra/newview/llwlparammanager.cpp             |  4 ++--
 19 files changed, 34 insertions(+), 64 deletions(-)

diff --git a/indra/integration_tests/llui_libtest/llui_libtest.cpp b/indra/integration_tests/llui_libtest/llui_libtest.cpp
index 1f15b73182d..c34115ee806 100644
--- a/indra/integration_tests/llui_libtest/llui_libtest.cpp
+++ b/indra/integration_tests/llui_libtest/llui_libtest.cpp
@@ -174,7 +174,7 @@ void export_test_floaters()
 	std::string delim = gDirUtilp->getDirDelimiter();
 	std::string xui_dir = get_xui_dir() + "en" + delim;
 	std::string filename;
-	while (gDirUtilp->getNextFileInDir(xui_dir, "floater_test_*.xml", filename, false))
+	while (gDirUtilp->getNextFileInDir(xui_dir, "floater_test_*.xml", filename))
 	{
 		if (filename.find("_new.xml") != std::string::npos)
 		{
diff --git a/indra/linux_updater/linux_updater.cpp b/indra/linux_updater/linux_updater.cpp
index be4d8108602..23c34e52e79 100644
--- a/indra/linux_updater/linux_updater.cpp
+++ b/indra/linux_updater/linux_updater.cpp
@@ -216,7 +216,7 @@ gboolean rotate_image_cb(gpointer data)
 std::string next_image_filename(std::string& image_path)
 {
 	std::string image_filename;
-	gDirUtilp->getNextFileInDir(image_path, "/*.jpg", image_filename, true);
+	gDirUtilp->getNextFileInDir(image_path, "/*.jpg", image_filename);
 	return image_path + "/" + image_filename;
 }
 
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp
index 938fb008c99..1179180da24 100644
--- a/indra/llvfs/lldir.cpp
+++ b/indra/llvfs/lldir.cpp
@@ -83,7 +83,7 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
 	std::string filename; 
 	std::string fullpath;
 	S32 result;
-	while (getNextFileInDir(dirname, mask, filename, FALSE))
+	while (getNextFileInDir(dirname, mask, filename))
 	{
 		fullpath = dirname;
 		fullpath += getDirDelimiter();
diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h
index 0730b0fa79f..643b89199b8 100644
--- a/indra/llvfs/lldir.h
+++ b/indra/llvfs/lldir.h
@@ -78,8 +78,7 @@ class LLDir
     /// Walk the files in a directory, with file pattern matching
 	virtual BOOL getNextFileInDir(const std::string &dirname, ///< directory path - must end in trailing slash!
                                   const std::string &mask,    ///< file pattern string (use "*" for all)
-                                  std::string &fname,         ///< found file name
-                                  BOOL wrap                   ///< DEPRECATED - set to FALSE
+                                  std::string &fname          ///< found file name
                                   ) = 0;
     /**<
      * @returns true if a file was found, false if the entire directory has been scanned.
diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp
index a1c6669b974..cf5fdd3b4a9 100644
--- a/indra/llvfs/lldir_linux.cpp
+++ b/indra/llvfs/lldir_linux.cpp
@@ -243,8 +243,7 @@ U32 LLDir_Linux::countFilesInDir(const std::string &dirname, const std::string &
 }
 
 // get the next file in the directory
-// automatically wrap if we've hit the end
-BOOL LLDir_Linux::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap)
+BOOL LLDir_Linux::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
 {
 	glob_t g;
 	BOOL result = FALSE;
@@ -276,11 +275,6 @@ BOOL LLDir_Linux::getNextFileInDir(const std::string &dirname, const std::string
 	
 			mCurrentDirIndex++;
 	
-			if((mCurrentDirIndex >= (int)g.gl_pathc) && wrap)
-			{
-				mCurrentDirIndex = 0;
-			}
-			
 			if(mCurrentDirIndex < (int)g.gl_pathc)
 			{
 //				llinfos << "getNextFileInDir: returning number " << mCurrentDirIndex << ", path is " << g.gl_pathv[mCurrentDirIndex] << llendl;
@@ -309,7 +303,6 @@ BOOL LLDir_Linux::getNextFileInDir(const std::string &dirname, const std::string
 
 
 // get a random file in the directory
-// automatically wrap if we've hit the end
 void LLDir_Linux::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
 {
 	S32 num_files;
diff --git a/indra/llvfs/lldir_linux.h b/indra/llvfs/lldir_linux.h
index 809959e873f..ef4495a627d 100644
--- a/indra/llvfs/lldir_linux.h
+++ b/indra/llvfs/lldir_linux.h
@@ -43,7 +43,7 @@ class LLDir_Linux : public LLDir
 public:	
 	virtual std::string getCurPath();
 	virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
-	virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap);
+	virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
 	virtual void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
 	/*virtual*/ BOOL fileExists(const std::string &filename) const;
 
diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp
index b41b0ec5dd9..290b3bd0db5 100644
--- a/indra/llvfs/lldir_mac.cpp
+++ b/indra/llvfs/lldir_mac.cpp
@@ -259,8 +259,7 @@ U32 LLDir_Mac::countFilesInDir(const std::string &dirname, const std::string &ma
 }
 
 // get the next file in the directory
-// automatically wrap if we've hit the end
-BOOL LLDir_Mac::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap)
+BOOL LLDir_Mac::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
 {
 	glob_t g;
 	BOOL result = FALSE;
@@ -292,11 +291,6 @@ BOOL LLDir_Mac::getNextFileInDir(const std::string &dirname, const std::string &
 	
 			mCurrentDirIndex++;
 	
-			if((mCurrentDirIndex >= g.gl_pathc) && wrap)
-			{
-				mCurrentDirIndex = 0;
-			}
-			
 			if(mCurrentDirIndex < g.gl_pathc)
 			{
 //				llinfos << "getNextFileInDir: returning number " << mCurrentDirIndex << ", path is " << g.gl_pathv[mCurrentDirIndex] << llendl;
diff --git a/indra/llvfs/lldir_mac.h b/indra/llvfs/lldir_mac.h
index 04c52dc9401..f80ca47d922 100644
--- a/indra/llvfs/lldir_mac.h
+++ b/indra/llvfs/lldir_mac.h
@@ -43,7 +43,7 @@ class LLDir_Mac : public LLDir
 	virtual S32 deleteFilesInDir(const std::string &dirname, const std::string &mask);
 	virtual std::string getCurPath();
 	virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
-	virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap);
+	virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
 	virtual void getRandomFileInDir(const std::string &dirname, const std::string &ask, std::string &fname);
 	virtual BOOL fileExists(const std::string &filename) const;
 
diff --git a/indra/llvfs/lldir_solaris.cpp b/indra/llvfs/lldir_solaris.cpp
index 4323dfd44ac..09a96ef6b3c 100644
--- a/indra/llvfs/lldir_solaris.cpp
+++ b/indra/llvfs/lldir_solaris.cpp
@@ -261,8 +261,7 @@ U32 LLDir_Solaris::countFilesInDir(const std::string &dirname, const std::string
 }
 
 // get the next file in the directory
-// automatically wrap if we've hit the end
-BOOL LLDir_Solaris::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap)
+BOOL LLDir_Solaris::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
 {
 	glob_t g;
 	BOOL result = FALSE;
@@ -294,11 +293,6 @@ BOOL LLDir_Solaris::getNextFileInDir(const std::string &dirname, const std::stri
 	
 			mCurrentDirIndex++;
 	
-			if((mCurrentDirIndex >= (int)g.gl_pathc) && wrap)
-			{
-				mCurrentDirIndex = 0;
-			}
-			
 			if(mCurrentDirIndex < (int)g.gl_pathc)
 			{
 //				llinfos << "getNextFileInDir: returning number " << mCurrentDirIndex << ", path is " << g.gl_pathv[mCurrentDirIndex] << llendl;
@@ -327,7 +321,6 @@ BOOL LLDir_Solaris::getNextFileInDir(const std::string &dirname, const std::stri
 
 
 // get a random file in the directory
-// automatically wrap if we've hit the end
 void LLDir_Solaris::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
 {
 	S32 num_files;
diff --git a/indra/llvfs/lldir_solaris.h b/indra/llvfs/lldir_solaris.h
index 6e0c5cfc690..1c21397c381 100644
--- a/indra/llvfs/lldir_solaris.h
+++ b/indra/llvfs/lldir_solaris.h
@@ -43,7 +43,7 @@ class LLDir_Solaris : public LLDir
 public:	
 	virtual std::string getCurPath();
 	virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
-	virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap);
+	virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
 	virtual void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
 	/*virtual*/ BOOL fileExists(const std::string &filename) const;
 
diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp
index 52d864e26f2..ecfa4a07d48 100644
--- a/indra/llvfs/lldir_win32.cpp
+++ b/indra/llvfs/lldir_win32.cpp
@@ -247,14 +247,14 @@ U32 LLDir_Win32::countFilesInDir(const std::string &dirname, const std::string &
 
 // get the next file in the directory
 // automatically wrap if we've hit the end
-BOOL LLDir_Win32::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap)
+BOOL LLDir_Win32::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
 {
 	llutf16string dirnamew = utf8str_to_utf16str(dirname);
-	return getNextFileInDir(dirnamew, mask, fname, wrap);
+	return getNextFileInDir(dirnamew, mask, fname);
 
 }
 
-BOOL LLDir_Win32::getNextFileInDir(const llutf16string &dirname, const std::string &mask, std::string &fname, BOOL wrap)
+BOOL LLDir_Win32::getNextFileInDir(const llutf16string &dirname, const std::string &mask, std::string &fname)
 {
 	WIN32_FIND_DATAW FileData;
 
@@ -290,15 +290,8 @@ BOOL LLDir_Win32::getNextFileInDir(const llutf16string &dirname, const std::stri
 				FindClose(mDirSearch_h);
 				mCurrentDir[0] = NULL;
 
-				if (wrap)
-				{
-					return(getNextFileInDir(pathname,"",fname,TRUE));
-				}
-				else
-				{
-					fname[0] = 0;
-					return(FALSE);
-				}
+                fname[0] = 0;
+                return(FALSE);
 			}
 			else
 			{
@@ -318,7 +311,6 @@ BOOL LLDir_Win32::getNextFileInDir(const llutf16string &dirname, const std::stri
 
 
 // get a random file in the directory
-// automatically wrap if we've hit the end
 void LLDir_Win32::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
 {
 	S32 num_files;
diff --git a/indra/llvfs/lldir_win32.h b/indra/llvfs/lldir_win32.h
index d3e45dc1f37..2ec9025250e 100644
--- a/indra/llvfs/lldir_win32.h
+++ b/indra/llvfs/lldir_win32.h
@@ -40,7 +40,7 @@ class LLDir_Win32 : public LLDir
 
 	/*virtual*/ std::string getCurPath();
 	/*virtual*/ U32 countFilesInDir(const std::string &dirname, const std::string &mask);
-	/*virtual*/ BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap);
+	/*virtual*/ BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
 	/*virtual*/ void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
 	/*virtual*/ BOOL fileExists(const std::string &filename) const;
 
diff --git a/indra/llvfs/tests/lldir_test.cpp b/indra/llvfs/tests/lldir_test.cpp
index 3247e0ab830..dc446ccbe52 100644
--- a/indra/llvfs/tests/lldir_test.cpp
+++ b/indra/llvfs/tests/lldir_test.cpp
@@ -311,7 +311,7 @@ namespace tut
       int   found1 = 0;
       bool  filesFound1[5] = { false, false, false, false, false };
       // std::cerr << "searching '"+dir1+"' for *\n";
-      while ( found1 <= 5 && gDirUtilp->getNextFileInDir(dir1, "*", scan1result, false) )
+      while ( found1 <= 5 && gDirUtilp->getNextFileInDir(dir1, "*", scan1result) )
       {
          found1++;
          // std::cerr << "  found '"+scan1result+"'\n";
@@ -338,7 +338,7 @@ namespace tut
       bool  filesFound2[5] = { false, false, false, false, false };
       // std::cerr << "searching '"+dir2+"' for *.xyz\n";
 
-      while ( found2 <= 5 && gDirUtilp->getNextFileInDir(dir2, "*.xyz", scan2result, false) )
+      while ( found2 <= 5 && gDirUtilp->getNextFileInDir(dir2, "*.xyz", scan2result) )
       {
          found2++;
          // std::cerr << "  found '"+scan2result+"'\n";
@@ -367,7 +367,7 @@ namespace tut
       bool  filesFound3[5] = { false, false, false, false, false };
       // std::cerr << "searching '"+dir2+"' for *.mno\n";
 
-      while ( found3 <= 5 && gDirUtilp->getNextFileInDir(dir2, "*.mno", scan3result, false) )
+      while ( found3 <= 5 && gDirUtilp->getNextFileInDir(dir2, "*.mno", scan3result) )
       {
          found3++;
          // std::cerr << "  found '"+scan3result+"'\n";
@@ -396,7 +396,7 @@ namespace tut
       bool  filesFound4[5] = { false, false, false, false, false };
       // std::cerr << "searching '"+dir1+"' for *.foo\n";
 
-      while ( found4 <= 5 && gDirUtilp->getNextFileInDir(dir1, "*.foo", scan4result, false) )
+      while ( found4 <= 5 && gDirUtilp->getNextFileInDir(dir1, "*.foo", scan4result) )
       {
          found4++;
          // std::cerr << "  found '"+scan4result+"'\n";
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 931b9fd2f37..b8313f779e2 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2991,7 +2991,7 @@ void LLAppViewer::migrateCacheDirectory()
 			S32 file_count = 0;
 			std::string file_name;
 			std::string mask = delimiter + "*.*";
-			while (gDirUtilp->getNextFileInDir(old_cache_dir, mask, file_name, false))
+			while (gDirUtilp->getNextFileInDir(old_cache_dir, mask, file_name))
 			{
 				if (file_name == "." || file_name == "..") continue;
 				std::string source_path = old_cache_dir + delimiter + file_name;
@@ -3210,7 +3210,7 @@ bool LLAppViewer::initCache()
 		dir = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,"");
 
 		std::string found_file;
-		if (gDirUtilp->getNextFileInDir(dir, mask, found_file, false))
+		if (gDirUtilp->getNextFileInDir(dir, mask, found_file))
 		{
 			old_vfs_data_file = dir + gDirUtilp->getDirDelimiter() + found_file;
 
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index 7629265730b..898cc1c0ba8 100644
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -504,8 +504,7 @@ std::string LLAppViewerLinux::generateSerialNumber()
 
 	// trawl /dev/disk/by-uuid looking for a good-looking UUID to grab
 	std::string this_name;
-	BOOL wrap = FALSE;
-	while (gDirUtilp->getNextFileInDir(uuiddir, "*", this_name, wrap))
+	while (gDirUtilp->getNextFileInDir(uuiddir, "*", this_name))
 	{
 		if (this_name.length() > best.length() ||
 		    (this_name.length() == best.length() &&
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index 5dc8067648e..5687b88a1f1 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -480,7 +480,7 @@ BOOL LLFloaterUIPreview::postBuild()
 	mLanguageSelection->removeall();																				// clear out anything temporarily in list from XML
 	while(found)																									// for every directory
 	{
-		if((found = gDirUtilp->getNextFileInDir(xui_dir, "*", language_directory, FALSE)))							// get next directory
+		if((found = gDirUtilp->getNextFileInDir(xui_dir, "*", language_directory)))							// get next directory
 		{
 			std::string full_path = xui_dir + language_directory;
 			if(LLFile::isfile(full_path.c_str()))																	// if it's not a directory, skip it
@@ -634,7 +634,7 @@ void LLFloaterUIPreview::refreshList()
 	BOOL found = TRUE;
 	while(found)				// for every floater file that matches the pattern
 	{
-		if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "floater_*.xml", name, FALSE)))	// get next file matching pattern
+		if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "floater_*.xml", name)))	// get next file matching pattern
 		{
 			addFloaterEntry(name.c_str());	// and add it to the list (file name only; localization code takes care of rest of path)
 		}
@@ -642,7 +642,7 @@ void LLFloaterUIPreview::refreshList()
 	found = TRUE;
 	while(found)				// for every inspector file that matches the pattern
 	{
-		if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "inspect_*.xml", name, FALSE)))	// get next file matching pattern
+		if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "inspect_*.xml", name)))	// get next file matching pattern
 		{
 			addFloaterEntry(name.c_str());	// and add it to the list (file name only; localization code takes care of rest of path)
 		}
@@ -650,7 +650,7 @@ void LLFloaterUIPreview::refreshList()
 	found = TRUE;
 	while(found)				// for every menu file that matches the pattern
 	{
-		if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "menu_*.xml", name, FALSE)))	// get next file matching pattern
+		if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "menu_*.xml", name)))	// get next file matching pattern
 		{
 			addFloaterEntry(name.c_str());	// and add it to the list (file name only; localization code takes care of rest of path)
 		}
@@ -658,7 +658,7 @@ void LLFloaterUIPreview::refreshList()
 	found = TRUE;
 	while(found)				// for every panel file that matches the pattern
 	{
-		if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "panel_*.xml", name, FALSE)))	// get next file matching pattern
+		if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "panel_*.xml", name)))	// get next file matching pattern
 		{
 			addFloaterEntry(name.c_str());	// and add it to the list (file name only; localization code takes care of rest of path)
 		}
@@ -667,7 +667,7 @@ void LLFloaterUIPreview::refreshList()
 	found = TRUE;
 	while(found)				// for every sidepanel file that matches the pattern
 	{
-		if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "sidepanel_*.xml", name, FALSE)))	// get next file matching pattern
+		if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "sidepanel_*.xml", name)))	// get next file matching pattern
 		{
 			addFloaterEntry(name.c_str());	// and add it to the list (file name only; localization code takes care of rest of path)
 		}
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 48ab122edff..31cf0acdd76 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1083,7 +1083,7 @@ void LLViewerMedia::clearAllCookies()
 	}
 	
 	// the hard part: iterate over all user directories and delete the cookie file from each one
-	while(gDirUtilp->getNextFileInDir(base_dir, "*_*", filename, false))
+	while(gDirUtilp->getNextFileInDir(base_dir, "*_*", filename))
 	{
 		target = base_dir;
 		target += filename;
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index 7314894c2ee..d2393478106 100644
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -89,7 +89,7 @@ void LLWaterParamManager::loadAllPresets(const std::string& file_name)
 	while(found) 
 	{
 		std::string name;
-		found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name, false);
+		found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name);
 		if(found)
 		{
 
@@ -115,7 +115,7 @@ void LLWaterParamManager::loadAllPresets(const std::string& file_name)
 	while(found) 
 	{
 		std::string name;
-		found = gDirUtilp->getNextFileInDir(path_name2, "*.xml", name, false);
+		found = gDirUtilp->getNextFileInDir(path_name2, "*.xml", name);
 		if(found)
 		{
 			name=name.erase(name.length()-4);
diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
index 9b6047395ad..e5f52dfc979 100644
--- a/indra/newview/llwlparammanager.cpp
+++ b/indra/newview/llwlparammanager.cpp
@@ -104,7 +104,7 @@ void LLWLParamManager::loadPresets(const std::string& file_name)
 	while(found) 
 	{
 		std::string name;
-		found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name, false);
+		found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name);
 		if(found)
 		{
 
@@ -130,7 +130,7 @@ void LLWLParamManager::loadPresets(const std::string& file_name)
 	while(found) 
 	{
 		std::string name;
-		found = gDirUtilp->getNextFileInDir(path_name2, "*.xml", name, false);
+		found = gDirUtilp->getNextFileInDir(path_name2, "*.xml", name);
 		if(found)
 		{
 			name=name.erase(name.length()-4);
-- 
GitLab