From 7c3638e09718557ca03f263b08d45c4b7face547 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 20 Dec 2017 17:27:43 -0500 Subject: MAINT-8087: Update to viewer-manager build 511531 --- autobuild.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 5ea349e55d..45e83901e0 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3231,9 +3231,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - a1cc313f9238316a514b8d3056f86b31 + e16cfcbef21c04ca51f2c6aa178d1f72 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11774/68078/viewer_manager-1.0.511462-darwin64-511462.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11874/69202/viewer_manager-1.0.511531-darwin64-511531.tar.bz2 name darwin64 @@ -3255,9 +3255,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 73894a49bd63e06adc0e365efae6e03e + 8f53d1b01fb7d62e497da5d0d5026857 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11775/68084/viewer_manager-1.0.511462-windows-511462.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11875/69208/viewer_manager-1.0.511531-windows-511531.tar.bz2 name windows @@ -3268,7 +3268,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors source_type hg version - 1.0.511462 + 1.0.511531 vlc-bin -- cgit v1.2.3 From 36e5f543ced86ce1d976c0740fe04bc36475fbaf Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 20 Dec 2017 22:33:28 -0500 Subject: MAINT-8087: Update to viewer-manager build 511535 --- autobuild.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 45e83901e0..532fecb815 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3231,9 +3231,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - e16cfcbef21c04ca51f2c6aa178d1f72 + 401b86c884995974220ac570e0a84ff1 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11874/69202/viewer_manager-1.0.511531-darwin64-511531.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11883/69273/viewer_manager-1.0.511535-darwin64-511535.tar.bz2 name darwin64 @@ -3255,9 +3255,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 8f53d1b01fb7d62e497da5d0d5026857 + 6e0ab85a8b19a575c56f52af3b871b2e url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11875/69208/viewer_manager-1.0.511531-windows-511531.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11884/69279/viewer_manager-1.0.511535-windows-511535.tar.bz2 name windows @@ -3268,7 +3268,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors source_type hg version - 1.0.511531 + 1.0.511535 vlc-bin -- cgit v1.2.3 From 5002bf5660f41685fc0549880994f4b35440d535 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 20 Dec 2017 22:51:26 -0500 Subject: MAINT-8087: Use env vars from VMP for AppData\Roaming and Local. On Windows, when logged in with a non-ASCII username, every one of the three documented APIs -- SHGetSpecialFolderPath(), SHGetFolderPath() and SHGetKnownFolderPath() -- fails to retrieve any pathname at all. We cannot account for the fact that the oldest of these continues to work with the release viewer and within a Python script (though not, curiously, from a Python interactive session). With a non-ASCII username, they consistently fail when called from an Alex Ivy viewer build: "The filename, directory name, or volume label syntax is incorrect." Empirically, with a non-ASCII username, the preset APPDATA and LOCALAPPDATA environment variables are also useless, e.g. c:\Users\??????\AppData\Roaming where those are, yup, actual question marks. Empirically, the VMP is able to successfully call SHGetFolderPath() to retrieve both AppData\Roaming and AppData\Local. Therefore, we make the VMP set the APPDATA and LOCALAPPDATA environment variables to the UTF-8 encoded correct pathnames. Instead of calling SHGetSomethingFolderPath() at all, make LLDir_Win32 retrieve those environment variables. Make LLFile::mkdir() treat "directory already exists" as a success case. Every single call fell into one of two categories: either it didn't check success at all, or it tested specially to exempt errno == EEXIST. Migrate that test into mkdir(); eliminate it from call sites. Make LLDir::append() and add() convenience functions accept variadic arguments. Replace add(add()...) constructs, as well as clumsy concatenations of directory names and getDirDelimiter(), with simple variadic add() calls. --- indra/llcommon/llfile.cpp | 9 ++- indra/llcommon/llfile.h | 1 + indra/llui/llspellcheck.cpp | 5 +- indra/llvfs/lldir.cpp | 11 +--- indra/llvfs/lldir.h | 25 +++++++- indra/llvfs/lldir_linux.cpp | 28 +++----- indra/llvfs/lldir_solaris.cpp | 28 +++----- indra/llvfs/lldir_win32.cpp | 128 ++++++++++++++++--------------------- indra/newview/llappviewer.cpp | 10 +-- indra/newview/llpresetsmanager.cpp | 10 +-- indra/newview/lltexturecache.cpp | 8 +-- indra/test/CMakeLists.txt | 4 -- 12 files changed, 112 insertions(+), 155 deletions(-) diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index 7b559861bb..8aa41035b9 100644 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -182,7 +182,14 @@ int LLFile::mkdir(const std::string& dirname, int perms) int rc = ::mkdir(dirname.c_str(), (mode_t)perms); #endif // We often use mkdir() to ensure the existence of a directory that might - // already exist. Don't spam the log if it does. + // already exist. There is no known case in which we want to call out as + // an error the requested directory already existing. + if (rc < 0 && errno == EEXIST) + { + // this is not the error you want, move along + return 0; + } + // anything else might be a problem return warnif("mkdir", dirname, rc, EEXIST); } diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h index 37eb75881c..ba935b8714 100644 --- a/indra/llcommon/llfile.h +++ b/indra/llcommon/llfile.h @@ -69,6 +69,7 @@ public: // perms is a permissions mask like 0777 or 0700. In most cases it will // be overridden by the user's umask. It is ignored on Windows. + // mkdir() considers "directory already exists" to be SUCCESS. static int mkdir(const std::string& filename, int perms = 0700); static int rmdir(const std::string& filename); diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp index 5a52600337..7f64743e99 100644 --- a/indra/llui/llspellcheck.cpp +++ b/indra/llui/llspellcheck.cpp @@ -406,10 +406,7 @@ const std::string LLSpellChecker::getDictionaryAppPath() const std::string LLSpellChecker::getDictionaryUserPath() { std::string dict_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, DICT_DIR, ""); - if (!gDirUtilp->fileExists(dict_path)) - { - LLFile::mkdir(dict_path); - } + LLFile::mkdir(dict_path); return dict_path; } diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index b845de71fa..2069888774 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -597,7 +597,7 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd << "': prefix is empty, possible bad filename" << LL_ENDL; } - std::string expanded_filename = add(add(prefix, subdir1), subdir2); + std::string expanded_filename = add(prefix, subdir1, subdir2); if (expanded_filename.empty() && in_filename.empty()) { return ""; @@ -693,7 +693,7 @@ void LLDir::walkSearchSkinDirs(const std::string& subdir, std::string subdir_path(add(skindir, subdir)); BOOST_FOREACH(std::string subsubdir, subsubdirs) { - std::string full_path(add(add(subdir_path, subsubdir), filename)); + std::string full_path(add(subdir_path, subsubdir, filename)); if (fileExists(full_path)) { function(subsubdir, full_path); @@ -1052,13 +1052,6 @@ void LLDir::dumpCurrentDirectories() LL_DEBUGS("AppInit","Directories") << " SkinDir: " << getSkinDir() << LL_ENDL; } -std::string LLDir::add(const std::string& path, const std::string& name) const -{ - std::string destpath(path); - append(destpath, name); - return destpath; -} - void LLDir::append(std::string& destpath, const std::string& name) const { // Delegate question of whether we need a separator to helper method. diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index b219c6e29f..e233413a7f 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -202,9 +202,28 @@ class LLDir /// Append specified @a name to @a destpath, separated by getDirDelimiter() /// if both are non-empty. void append(std::string& destpath, const std::string& name) const; - /// Append specified @a name to @a path, separated by getDirDelimiter() - /// if both are non-empty. Return result, leaving @a path unmodified. - std::string add(const std::string& path, const std::string& name) const; + /// Variadic form: append @a name0 and @a name1 and arbitrary other @a + /// names to @a destpath, separated by getDirDelimiter() as needed. + template + void append(std::string& destpath, const std::string& name0, const std::string& name1, + const NAMES& ... names) const + { + // In a typical recursion case, we'd accept (destpath, name0, names). + // We accept (destpath, name0, name1, names) because it's important to + // delegate the two-argument case to the non-template implementation. + append(destpath, name0); + append(destpath, name1, names...); + } + + /// Append specified @a names to @a path, separated by getDirDelimiter() + /// as needed. Return result, leaving @a path unmodified. + template + std::string add(const std::string& path, const NAMES& ... names) const + { + std::string destpath(path); + append(destpath, names...); + return destpath; + } protected: // Does an add() or append() call need a directory delimiter? diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp index 7a4034c228..a9f3166d41 100644 --- a/indra/llvfs/lldir_linux.cpp +++ b/indra/llvfs/lldir_linux.cpp @@ -185,41 +185,29 @@ void LLDir_Linux::initAppDirs(const std::string &app_name, int res = LLFile::mkdir(mOSUserAppDir); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create app user dir " << mOSUserAppDir << LL_ENDL; - LL_WARNS() << "Default to base dir" << mOSUserDir << LL_ENDL; - mOSUserAppDir = mOSUserDir; - } + LL_WARNS() << "Couldn't create app user dir " << mOSUserAppDir << LL_ENDL; + LL_WARNS() << "Default to base dir" << mOSUserDir << LL_ENDL; + mOSUserAppDir = mOSUserDir; } res = LLFile::mkdir(getExpandedFilename(LL_PATH_LOGS,"")); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create LL_PATH_LOGS dir " << getExpandedFilename(LL_PATH_LOGS,"") << LL_ENDL; - } + LL_WARNS() << "Couldn't create LL_PATH_LOGS dir " << getExpandedFilename(LL_PATH_LOGS,"") << LL_ENDL; } res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SETTINGS,"")); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create LL_PATH_USER_SETTINGS dir " << getExpandedFilename(LL_PATH_USER_SETTINGS,"") << LL_ENDL; - } + LL_WARNS() << "Couldn't create LL_PATH_USER_SETTINGS dir " << getExpandedFilename(LL_PATH_USER_SETTINGS,"") << LL_ENDL; } - + res = LLFile::mkdir(getExpandedFilename(LL_PATH_CACHE,"")); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL; - } + LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL; } - + mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem"); } diff --git a/indra/llvfs/lldir_solaris.cpp b/indra/llvfs/lldir_solaris.cpp index b43b2f27ce..d60237bacc 100644 --- a/indra/llvfs/lldir_solaris.cpp +++ b/indra/llvfs/lldir_solaris.cpp @@ -203,41 +203,29 @@ void LLDir_Solaris::initAppDirs(const std::string &app_name, int res = LLFile::mkdir(mOSUserAppDir); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create app user dir " << mOSUserAppDir << LL_ENDL; - LL_WARNS() << "Default to base dir" << mOSUserDir << LL_ENDL; - mOSUserAppDir = mOSUserDir; - } + LL_WARNS() << "Couldn't create app user dir " << mOSUserAppDir << LL_ENDL; + LL_WARNS() << "Default to base dir" << mOSUserDir << LL_ENDL; + mOSUserAppDir = mOSUserDir; } res = LLFile::mkdir(getExpandedFilename(LL_PATH_LOGS,"")); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create LL_PATH_LOGS dir " << getExpandedFilename(LL_PATH_LOGS,"") << LL_ENDL; - } + LL_WARNS() << "Couldn't create LL_PATH_LOGS dir " << getExpandedFilename(LL_PATH_LOGS,"") << LL_ENDL; } res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SETTINGS,"")); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create LL_PATH_USER_SETTINGS dir " << getExpandedFilename(LL_PATH_USER_SETTINGS,"") << LL_ENDL; - } + LL_WARNS() << "Couldn't create LL_PATH_USER_SETTINGS dir " << getExpandedFilename(LL_PATH_USER_SETTINGS,"") << LL_ENDL; } - + res = LLFile::mkdir(getExpandedFilename(LL_PATH_CACHE,"")); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL; - } + LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL; } - + mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem"); } diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp index 4d8aa0e189..5485349c83 100644 --- a/indra/llvfs/lldir_win32.cpp +++ b/indra/llvfs/lldir_win32.cpp @@ -32,10 +32,7 @@ #include "llerror.h" #include "llrand.h" // for gLindenLabRandomNumber #include -#include -#include -#include -#include // CoTaskMemFree() +#include #include #include @@ -46,47 +43,15 @@ #define PACKVERSION(major,minor) MAKELONG(minor,major) DWORD GetDllVersion(LPCTSTR lpszDllName); -namespace { - -std::string getKnownFolderPath(const std::string& desc, REFKNOWNFOLDERID folderid) -{ - // https://msdn.microsoft.com/en-us/library/windows/desktop/bb762188(v=vs.85).aspx - PWSTR wstrptr = 0; - HRESULT result = SHGetKnownFolderPath( - folderid, - KF_FLAG_DEFAULT, // no flags - NULL, // current user, no impersonation - &wstrptr); - if (result == S_OK) - { - std::string utf8 = utf16str_to_utf8str(llutf16string(wstrptr)); - // have to free the returned pointer after copying its data - CoTaskMemFree(wstrptr); - return utf8; - } - - // gack, no logging yet! - // at least say something to a developer trying to debug this... - static std::map codes - { - { E_FAIL, "E_FAIL; known folder does not have a path?" }, - { E_INVALIDARG, "E_INVALIDARG; not present on system?" } - }; - auto found = codes.find(result); - const char* text = (found == codes.end())? "unknown" : found->second; - std::cout << "*** SHGetKnownFolderPath(" << desc << ") failed with " - << result << " (" << text << ")\n"; - return {}; -} - -} // anonymous namespace - LLDir_Win32::LLDir_Win32() { + // set this first: used by append() and add() methods mDirDelimiter = "\\"; - // Application Data is where user settings go - mOSUserDir = getKnownFolderPath("RoamingAppData", FOLDERID_RoamingAppData); + // Application Data is where user settings go. We rely on $APPDATA being + // correct; in fact the VMP makes a point of setting it properly, since + // Windows itself botches the job for non-ASCII usernames (MAINT-8087). + mOSUserDir = ll_safe_string(getenv("APPDATA")); // We want cache files to go on the local disk, even if the // user is on a network with a "roaming profile". @@ -96,7 +61,7 @@ LLDir_Win32::LLDir_Win32() // // We used to store the cache in AppData\Roaming, and the installer // cleans up that version on upgrade. JC - mOSCacheDir = getKnownFolderPath("LocalAppData", FOLDERID_LocalAppData); + mOSCacheDir = ll_safe_string(getenv("LOCALAPPDATA")); WCHAR w_str[MAX_PATH]; if (GetTempPath(MAX_PATH, w_str)) @@ -122,6 +87,38 @@ LLDir_Win32::LLDir_Win32() mTempDir = mOSUserDir; } +/*==========================================================================*| + // Now that we've got mOSUserDir, one way or another, let's see how we did + // with our environment variables. + { + auto report = [this](std::ostream& out){ + out << "mOSUserDir = '" << mOSUserDir << "'\n" + << "mOSCacheDir = '" << mOSCacheDir << "'\n" + << "mTempDir = '" << mTempDir << "'" << std::endl; + }; + int res = LLFile::mkdir(mOSUserDir); + if (res == -1) + { + // If we couldn't even create the directory, just blurt to stderr + report(std::cerr); + } + else + { + // successfully created logdir, plunk a log file there + std::string logfilename(add(mOSUserDir, "lldir.log")); + std::ofstream logfile(logfilename.c_str()); + if (! logfile.is_open()) + { + report(std::cerr); + } + else + { + report(logfile); + } + } + } +|*==========================================================================*/ + // fprintf(stderr, "mTempDir = <%s>",mTempDir); // Set working directory, for LLDir::getWorkingDir() @@ -167,7 +164,7 @@ LLDir_Win32::LLDir_Win32() // 'llplugin' need to go somewhere else. // alas... this also gets called during static initialization // time due to the construction of gDirUtil in lldir.cpp. - if(! LLFile::isdir(mAppRODataDir + mDirDelimiter + "skins")) + if(! LLFile::isdir(add(mAppRODataDir, "skins"))) { // What? No skins in the working dir? // Try the executable's directory. @@ -176,7 +173,7 @@ LLDir_Win32::LLDir_Win32() // LL_INFOS() << "mAppRODataDir = " << mAppRODataDir << LL_ENDL; - mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins"; + mSkinBaseDir = add(mAppRODataDir, "skins"); // Build the default cache directory mDefaultCacheDir = buildSLOSCacheDir(); @@ -185,13 +182,10 @@ LLDir_Win32::LLDir_Win32() int res = LLFile::mkdir(mDefaultCacheDir); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << mDefaultCacheDir << LL_ENDL; - } + LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << mDefaultCacheDir << LL_ENDL; } - mLLPluginDir = mExecutableDir + mDirDelimiter + "llplugin"; + mLLPluginDir = add(mExecutableDir, "llplugin"); } LLDir_Win32::~LLDir_Win32() @@ -207,52 +201,38 @@ void LLDir_Win32::initAppDirs(const std::string &app_name, if (!app_read_only_data_dir.empty()) { mAppRODataDir = app_read_only_data_dir; - mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins"; + mSkinBaseDir = add(mAppRODataDir, "skins"); } mAppName = app_name; - mOSUserAppDir = mOSUserDir; - mOSUserAppDir += "\\"; - mOSUserAppDir += app_name; + mOSUserAppDir = add(mOSUserDir, app_name); int res = LLFile::mkdir(mOSUserAppDir); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create app user dir " << mOSUserAppDir << LL_ENDL; - LL_WARNS() << "Default to base dir" << mOSUserDir << LL_ENDL; - mOSUserAppDir = mOSUserDir; - } + LL_WARNS() << "Couldn't create app user dir " << mOSUserAppDir << LL_ENDL; + LL_WARNS() << "Default to base dir" << mOSUserDir << LL_ENDL; + mOSUserAppDir = mOSUserDir; } //dumpCurrentDirectories(); res = LLFile::mkdir(getExpandedFilename(LL_PATH_LOGS,"")); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create LL_PATH_LOGS dir " << getExpandedFilename(LL_PATH_LOGS,"") << LL_ENDL; - } + LL_WARNS() << "Couldn't create LL_PATH_LOGS dir " << getExpandedFilename(LL_PATH_LOGS,"") << LL_ENDL; } - + res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SETTINGS,"")); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create LL_PATH_USER_SETTINGS dir " << getExpandedFilename(LL_PATH_USER_SETTINGS,"") << LL_ENDL; - } + LL_WARNS() << "Couldn't create LL_PATH_USER_SETTINGS dir " << getExpandedFilename(LL_PATH_USER_SETTINGS,"") << LL_ENDL; } - + res = LLFile::mkdir(getExpandedFilename(LL_PATH_CACHE,"")); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL; - } + LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL; } - + mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem"); } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 087a672d69..b33b3a6410 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4136,10 +4136,7 @@ void dumpVFSCaches() S32 res = LLFile::mkdir("StaticVFSDump"); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create dir StaticVFSDump" << LL_ENDL; - } + LL_WARNS() << "Couldn't create dir StaticVFSDump" << LL_ENDL; } SetCurrentDirectory(utf8str_to_utf16str("StaticVFSDump").c_str()); gStaticVFS->dumpFiles(); @@ -4153,10 +4150,7 @@ void dumpVFSCaches() res = LLFile::mkdir("VFSDump"); if (res == -1) { - if (errno != EEXIST) - { - LL_WARNS() << "Couldn't create dir VFSDump" << LL_ENDL; - } + LL_WARNS() << "Couldn't create dir VFSDump" << LL_ENDL; } SetCurrentDirectory(utf8str_to_utf16str("VFSDump").c_str()); gVFS->dumpFiles(); diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index 76d721ecdc..96818d5a21 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -78,16 +78,10 @@ std::string LLPresetsManager::getPresetsDir(const std::string& subdirectory) std::string presets_path = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR); std::string full_path; - if (!gDirUtilp->fileExists(presets_path)) - { - LLFile::mkdir(presets_path); - } + LLFile::mkdir(presets_path); full_path = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR, subdirectory); - if (!gDirUtilp->fileExists(full_path)) - { - LLFile::mkdir(full_path); - } + LLFile::mkdir(full_path); return full_path; } diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 435d833345..371da5d0a2 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1054,11 +1054,11 @@ S64 LLTextureCache::initCache(ELLPath location, S64 max_size, BOOL texture_cache return max_size ; } } - + if (!mReadOnly) { LLFile::mkdir(mTexturesDirName); - + const char* subdirs = "0123456789abcdef"; for (S32 i=0; i<16; i++) { @@ -1602,11 +1602,11 @@ void LLTextureCache::clearCorruptedCache() closeHeaderEntriesFile();//close possible file handler purgeAllTextures(false) ; //clear the cache. - + if (!mReadOnly) //regenerate the directory tree if not exists. { LLFile::mkdir(mTexturesDirName); - + const char* subdirs = "0123456789abcdef"; for (S32 i=0; i<16; i++) { diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 3f12431acc..8344cead57 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -73,9 +73,6 @@ if (NOT WINDOWS) list(APPEND test_SOURCE_FILES llmessagetemplateparser_tut.cpp ) - set(EXTRA_WINDOWS_LIBRARIES "") -else (NOT WINDOWS) - set(EXTRA_WINDOWS_LIBRARIES ole32) endif (NOT WINDOWS) set_source_files_properties(${test_HEADER_FILES} @@ -99,7 +96,6 @@ target_link_libraries(lltest ${GOOGLEMOCK_LIBRARIES} ${PTHREAD_LIBRARY} ${WINDOWS_LIBRARIES} - ${EXTRA_WINDOWS_LIBRARIES} ${BOOST_PROGRAM_OPTIONS_LIBRARY} ${BOOST_REGEX_LIBRARY} ${BOOST_COROUTINE_LIBRARY} -- cgit v1.2.3 From dfd62c56d3b2da9e17c17f8e5ee0c09b3333a970 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 21 Dec 2017 09:27:36 -0500 Subject: MAINT-8087: Update to viewer-manager build 511542 --- autobuild.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 532fecb815..b7371893f9 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3231,9 +3231,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 401b86c884995974220ac570e0a84ff1 + 75e29dcb5b326eddd473a841436cf226 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11883/69273/viewer_manager-1.0.511535-darwin64-511535.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11895/69299/viewer_manager-1.0.511542-darwin64-511542.tar.bz2 name darwin64 @@ -3255,9 +3255,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 6e0ab85a8b19a575c56f52af3b871b2e + e27bdc13c25d68aeb65238752e8d067e url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11884/69279/viewer_manager-1.0.511535-windows-511535.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11897/69334/viewer_manager-1.0.511542-windows-511542.tar.bz2 name windows @@ -3268,7 +3268,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors source_type hg version - 1.0.511535 + 1.0.511542 vlc-bin -- cgit v1.2.3 From 6b3ac6823d7d2eb1566b70c69109ffd57faa4e97 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Thu, 21 Dec 2017 13:08:32 -0800 Subject: A change elsewhere in the viewer_manifest.py script that copies files into the right place after a build impacted the fragment of code that copies over the VLC runtime files (Libvlc.dll, libvlccore.dll and the VLC plugins dir) and they never made it to the right place. This change restores that copy --- indra/newview/viewer_manifest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index f930e8b2ce..e0c332681e 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -689,10 +689,10 @@ class WindowsManifest(ViewerManifest): self.path("zh-CN.pak") self.path("zh-TW.pak") - with self.prefix(src=os.path.join(pkgdir, 'bin', 'release'), dst="llplugin"): - self.path("libvlc.dll") - self.path("libvlccore.dll") - self.path("plugins/") + with self.prefix(src=os.path.join(pkgdir, 'bin', 'release'), dst="llplugin"): + self.path("libvlc.dll") + self.path("libvlccore.dll") + self.path("plugins/") # pull in the crash logger and updater from other projects # tag:"crash-logger" here as a cue to the exporter -- cgit v1.2.3 From 7ac3a755e713d0a34747660b3d48d0a7f6978c3e Mon Sep 17 00:00:00 2001 From: callum_linden Date: Thu, 21 Dec 2017 14:36:50 -0800 Subject: MAINT-8119 Fix. A change elsewhere in the viewer_manifest.py script that copies files into the right place after a build impacted the fragment of code that copies over the VLC runtime files (Libvlc.dll, libvlccore.dll and the VLC plugins dir) and they never made it to the right place. This change restores that copy --- indra/newview/viewer_manifest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index f930e8b2ce..e0c332681e 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -689,10 +689,10 @@ class WindowsManifest(ViewerManifest): self.path("zh-CN.pak") self.path("zh-TW.pak") - with self.prefix(src=os.path.join(pkgdir, 'bin', 'release'), dst="llplugin"): - self.path("libvlc.dll") - self.path("libvlccore.dll") - self.path("plugins/") + with self.prefix(src=os.path.join(pkgdir, 'bin', 'release'), dst="llplugin"): + self.path("libvlc.dll") + self.path("libvlccore.dll") + self.path("plugins/") # pull in the crash logger and updater from other projects # tag:"crash-logger" here as a cue to the exporter -- cgit v1.2.3 From 2e388c92a4400a0a61b05b7f7aaae49abe878a25 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 2 Jan 2018 20:49:21 -0500 Subject: MAINT-8078: Update to viewer-manager build 511634 --- autobuild.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index b7371893f9..c747f67a17 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3231,9 +3231,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 75e29dcb5b326eddd473a841436cf226 + 8c0816f7b4e48ae6232f731f26b97c32 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11895/69299/viewer_manager-1.0.511542-darwin64-511542.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12019/70060/viewer_manager-1.0.511634-darwin64-511634.tar.bz2 name darwin64 @@ -3255,9 +3255,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - e27bdc13c25d68aeb65238752e8d067e + d0d72cc42f2b1a93a6ffd75999ac5014 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/11897/69334/viewer_manager-1.0.511542-windows-511542.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12020/70066/viewer_manager-1.0.511634-windows-511634.tar.bz2 name windows @@ -3268,7 +3268,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors source_type hg version - 1.0.511542 + 1.0.511634 vlc-bin -- cgit v1.2.3 From 17891cfcda13ef990d7ac000395396a6a6ee78d6 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 3 Jan 2018 15:32:21 -0500 Subject: MAINT-8078: Update to viewer-manager build 511658 --- autobuild.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index c747f67a17..0b827f2080 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3231,9 +3231,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 8c0816f7b4e48ae6232f731f26b97c32 + a8071b247d78e5555340f83e3491e7df url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12019/70060/viewer_manager-1.0.511634-darwin64-511634.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12055/70540/viewer_manager-1.0.511658-darwin64-511658.tar.bz2 name darwin64 @@ -3255,9 +3255,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - d0d72cc42f2b1a93a6ffd75999ac5014 + a9597ba92618b2616e058dee8f56c80c url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12020/70066/viewer_manager-1.0.511634-windows-511634.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12056/70546/viewer_manager-1.0.511658-windows-511658.tar.bz2 name windows @@ -3268,7 +3268,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors source_type hg version - 1.0.511634 + 1.0.511658 vlc-bin -- cgit v1.2.3