diff options
| author | Aura Linden <aura@lindenlab.com> | 2012-07-24 12:11:20 -0700 |
|---|---|---|
| committer | Aura Linden <aura@lindenlab.com> | 2012-07-24 12:11:20 -0700 |
| commit | ed4b37906749dd7ba2da56af741f2c0826f222d1 (patch) | |
| tree | a40eb4acce9747df9c7ff0150f60d543d6f02f59 /indra/llvfs/lldir_mac.cpp | |
| parent | 629ae69793f98c1c92c08b1d657e94306fb920e7 (diff) | |
Eliminated countFilesInDir boostified getCurPath for OSX
Diffstat (limited to 'indra/llvfs/lldir_mac.cpp')
| -rw-r--r-- | indra/llvfs/lldir_mac.cpp | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp index 489bc3e4a7..f0b46ade6d 100644 --- a/indra/llvfs/lldir_mac.cpp +++ b/indra/llvfs/lldir_mac.cpp @@ -35,6 +35,7 @@ #include <sys/stat.h> #include <unistd.h> #include <glob.h> +#include <boost/filesystem.hpp> #include <Carbon/Carbon.h> @@ -239,34 +240,12 @@ void LLDir_Mac::initAppDirs(const std::string &app_name, //dumpCurrentDirectories(); } -U32 LLDir_Mac::countFilesInDir(const std::string &dirname, const std::string &mask) -{ - U32 file_count = 0; - glob_t g; - - std::string tmp_str; - tmp_str = dirname; - tmp_str += mask; - - if(glob(tmp_str.c_str(), GLOB_NOSORT, NULL, &g) == 0) - { - file_count = g.gl_pathc; - - globfree(&g); - } - - return (file_count); -} - std::string LLDir_Mac::getCurPath() { - char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */ - getcwd(tmp_str, LL_MAX_PATH); - return tmp_str; + return boost::filesystem::path( boost::filesystem::current_path() ).string(); } - BOOL LLDir_Mac::fileExists(const std::string &filename) const { struct stat stat_data; |
