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.
* Removed leading delimiter from filename mask in all calls to
LLDir::deleteFilesInDir() that are related to the viewer asset caches
(texture, VFS, and VO).
* Changed the hard coded cache limit in llappviewer.cpp to 10GB as well as the
slider maximum in the preferences menu. * The VFS cache is capped at 1GB due
to file system limitations. The former 80/20 split between texture/vfs is
maintained up to 5GB. Above this limit the texture cache is given all
the additional cache space up to 10GB.
* Fixed a log message in lltexturecache.cpp that was not showing the correct
texture size. ER-883
* Fixed a bug in llfloaterpreference.cpp that caused new cache value to be
written to the old cache setting. This resulted in the the cache not being
cleared when the location was set back to the default. ER-882
* Disabled the "The cache will be cleared on reboot" message that is triggered
by the reset button in the cache preferences in the case where the cache
is already located in the default location. The cache is only cleared when
its location is changed. This is intended to address resident confusion
regarding the purpose of the reset button, as demonstrated in VWR-19562.