diff options
author | Igor Borovkov <iborovkov@productengine.com> | 2009-12-10 19:02:32 +0200 |
---|---|---|
committer | Igor Borovkov <iborovkov@productengine.com> | 2009-12-10 19:02:32 +0200 |
commit | 3e13bc913f3e527b1a9d4f500ad038c06cdf6525 (patch) | |
tree | 3e93416b19e77afdd834a581206ddcad99dc8a58 /indra/test_apps/llplugintest | |
parent | f11c6044562571d42c76abede6fa90db2b08493f (diff) | |
parent | 6a59342963aaf4188d1c1b104d71c31eae027d2b (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/test_apps/llplugintest')
-rw-r--r-- | indra/test_apps/llplugintest/llmediaplugintest.cpp | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp index 27cb52a507..30d338292e 100644 --- a/indra/test_apps/llplugintest/llmediaplugintest.cpp +++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp @@ -1529,7 +1529,21 @@ void LLMediaPluginTest::addMediaPanel( 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 @@ -1752,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 |