summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorEli Linden <eli@lindenlab.com>2010-05-27 16:54:57 -0700
committerEli Linden <eli@lindenlab.com>2010-05-27 16:54:57 -0700
commit776fea3764bd1a14a712dcfe22f2b254b188f0a6 (patch)
tree90e23844d5dde0de1154df92ab0f9cb55db8b36c /indra/newview/llappviewer.cpp
parentd7f065684d0cb0ffc3b050eb4c22b81652db2249 (diff)
parent0c7fafb70425853df26c703969e7a1892de2374e (diff)
Merge
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 f7f7cb599e..475a075d7e 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2979,6 +2979,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;
@@ -3196,11 +3234,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;
}