summaryrefslogtreecommitdiff
path: root/indra/test_apps/llplugintest/llmediaplugintest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/test_apps/llplugintest/llmediaplugintest.cpp')
-rw-r--r--indra/test_apps/llplugintest/llmediaplugintest.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp
index c6df77f9a4..30d338292e 100644
--- a/indra/test_apps/llplugintest/llmediaplugintest.cpp
+++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp
@@ -1531,6 +1531,9 @@ void LLMediaPluginTest::addMediaPanel( std::string url )
#endif
// for this test app, use the cwd as the user data path (ugh).
+#if LL_WINDOWS
+ std::string user_data_path = ".\\";
+#else
char cwd[ FILENAME_MAX ];
if (NULL == getcwd( cwd, FILENAME_MAX - 1 ))
{
@@ -1538,6 +1541,7 @@ void LLMediaPluginTest::addMediaPanel( std::string url )
return;
}
std::string user_data_path = std::string( cwd ) + "/";
+#endif
media_source->init( launcher_name, plugin_name, false, user_data_path );
media_source->setDisableTimeout(mDisableTimeout);
@@ -1762,7 +1766,21 @@ void LLMediaPluginTest::replaceMediaPanel( mediaPanel* panel, std::string url )
#elif LL_WINDOWS
std::string launcher_name( "SLPlugin.exe" );
#endif
- media_source->init( launcher_name, plugin_name );
+
+ // for this test app, use the cwd as the user data path (ugh).
+#if LL_WINDOWS
+ std::string user_data_path = ".\\";
+#else
+ char cwd[ FILENAME_MAX ];
+ if (NULL == getcwd( cwd, FILENAME_MAX - 1 ))
+ {
+ std::cerr << "Couldn't get cwd - probably too long - failing to init." << llendl;
+ return;
+ }
+ std::string user_data_path = std::string( cwd ) + "/";
+#endif
+
+ media_source->init( launcher_name, plugin_name, false, user_data_path );
media_source->setDisableTimeout(mDisableTimeout);
// make a new panel and save parameters