summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-05-28 09:59:39 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-05-28 09:59:39 +0100
commitd5d24548286ccdbc2008fbf8b5a4ea723063ecf0 (patch)
tree7cad61535554bd8fb333ea4b1e2ef34be8712f30 /indra/newview/llappviewer.cpp
parentbe6dc84b12c0c12975d8317604e5bff85fa14049 (diff)
parenta7ffd8b7a3d26be6f1841f538631adbb0f3f5604 (diff)
merge from viewer-public
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp49
1 files changed, 44 insertions, 5 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index fd78bc62c8..1c8d1a47a0 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2994,6 +2994,44 @@ S32 LLAppViewer::getCacheVersion()
return cache_version ;
}
+void dumpVFSCaches()
+{
+ llinfos << "======= Static VFS ========" << llendl;
+ gStaticVFS->listFiles();
+#if LL_WINDOWS
+ llinfos << "======= Dumping static VFS to StaticVFSDump ========" << llendl;
+ WCHAR w_str[MAX_PATH];
+ GetCurrentDirectory(MAX_PATH, w_str);
+ S32 res = LLFile::mkdir("StaticVFSDump");
+ if (res == -1)
+ {
+ if (errno != EEXIST)
+ {
+ llwarns << "Couldn't create dir StaticVFSDump" << llendl;
+ }
+ }
+ SetCurrentDirectory(utf8str_to_utf16str("StaticVFSDump").c_str());
+ gStaticVFS->dumpFiles();
+ SetCurrentDirectory(w_str);
+#endif
+
+ llinfos << "========= Dynamic VFS ====" << llendl;
+ gVFS->listFiles();
+#if LL_WINDOWS
+ llinfos << "========= Dumping dynamic VFS to VFSDump ====" << llendl;
+ res = LLFile::mkdir("VFSDump");
+ if (res == -1)
+ {
+ if (errno != EEXIST)
+ {
+ llwarns << "Couldn't create dir VFSDump" << llendl;
+ }
+ }
+ SetCurrentDirectory(utf8str_to_utf16str("VFSDump").c_str());
+ gVFS->dumpFiles();
+ SetCurrentDirectory(w_str);
+#endif
+}
bool LLAppViewer::initCache()
{
mPurgeCache = false;
@@ -3211,11 +3249,12 @@ bool LLAppViewer::initCache()
{
LLVFile::initClass();
- //llinfos << "Static VFS listing" << llendl;
- //gStaticVFS->listFiles();
-
- //llinfos << "regular VFS listing" << llendl;
- //gVFS->listFiles();
+#ifndef LL_RELEASE_FOR_DOWNLOAD
+ if (gSavedSettings.getBOOL("DumpVFSCaches"))
+ {
+ dumpVFSCaches();
+ }
+#endif
return true;
}