summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-03-18 11:16:56 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-03-18 11:16:56 +0000
commit3813a9b87235dcbf4dcecbaff8962b4e37e230e2 (patch)
treea0cb67d89295c20052caa439f9a76fbf0c889033 /extensions
parent5dee8aac0d9ea4f3c79031747862413524adacd5 (diff)
INTEGRATION: CWS sb83 (1.12.16); FILE MERGED
2008/02/12 08:36:10 sb 1.12.16.1: #i86033# call pluginapp.bin with full path
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/plugin/unx/unxmgr.cxx27
1 files changed, 18 insertions, 9 deletions
diff --git a/extensions/source/plugin/unx/unxmgr.cxx b/extensions/source/plugin/unx/unxmgr.cxx
index b15a962d7a50..0c8ceb3667f6 100644
--- a/extensions/source/plugin/unx/unxmgr.cxx
+++ b/extensions/source/plugin/unx/unxmgr.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: unxmgr.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: ihi $ $Date: 2008-01-14 14:54:28 $
+ * last change: $Author: vg $ $Date: 2008-03-18 12:16:56 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -41,6 +41,7 @@
#include <dirent.h>
#include <osl/thread.h>
#include <rtl/strbuf.hxx>
+#include <tools/appendunixshellword.hxx>
#include <vcl/svapp.hxx>
#include <plugin/impl.hxx>
@@ -87,11 +88,20 @@ static bool CheckPlugin( const ByteString& rPath, list< PluginDescription* >& rD
rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
- ByteString aCommand( "pluginapp.bin \"" );
- aCommand.Append( rPath );
- aCommand.Append( '"' );
+ rtl::OString path;
+ if (!UnxPluginComm::getPluginappPath(&path)) {
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "cannot construct path to pluginapp.bin\n" );
+#endif
+ return false;
+ }
+ rtl::OStringBuffer cmd;
+ tools::appendUnixShellWord(&cmd, path);
+ cmd.append(' ');
+ tools::appendUnixShellWord(&cmd, rPath);
+ rtl::OString aCommand(cmd.makeStringAndClear());
- FILE* pResult = popen( aCommand.GetBuffer(), "r" );
+ FILE* pResult = popen( aCommand.getStr(), "r" );
int nDescriptions = 0;
if( pResult )
{
@@ -160,12 +170,12 @@ static bool CheckPlugin( const ByteString& rPath, list< PluginDescription* >& rD
#if OSL_DEBUG_LEVEL > 1
else
fprintf( stderr, "result of \"%s\" contains no mimtype\n",
- aCommand.GetBuffer() );
+ aCommand.getStr() );
#endif
}
#if OSL_DEBUG_LEVEL > 1
else
- fprintf( stderr, "command \"%s\" failed\n", aCommand.GetBuffer() );
+ fprintf( stderr, "command \"%s\" failed\n", aCommand.getStr() );
#endif
return nDescriptions > 0;
}
@@ -272,4 +282,3 @@ Sequence<PluginDescription> XPluginManager_Impl::getPluginDescriptions() throw()
}
return aDescriptions;
}
-