diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2000-11-08 08:37:10 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2000-11-08 08:37:10 +0000 |
commit | f46f30798156164d640104bd2aa4a81b8652800a (patch) | |
tree | 89dc5ccc9ebb3f5d9b5ee43751c511335d421bd9 /stoc | |
parent | 415651ce234e669b0e421d6b251a00e2aeb73192 (diff) |
minor CPLD_ACCESSPATH
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/loader/dllcomponentloader.cxx | 58 |
1 files changed, 39 insertions, 19 deletions
diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx index f197386ad93c..3435112f805b 100644 --- a/stoc/source/loader/dllcomponentloader.cxx +++ b/stoc/source/loader/dllcomponentloader.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dllcomponentloader.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dbo $ $Date: 2000-11-07 14:50:01 $ + * last change: $Author: dbo $ $Date: 2000-11-08 09:37:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -294,9 +294,24 @@ static oslModule loadModule( const OUString & rLibName, sal_Int32 nMode ) { OUString aBaseDir( *iPos ); OUString aAbs; - if (osl_File_E_None == ::osl_getAbsolutePath( - aBaseDir.pData, rLibName.pData, &aAbs.pData )) // file exists + + if (rLibName.getLength() > 2 && + rLibName.getStr()[0] == '/' && + rLibName.getStr()[1] == '/') // absolute unc path given? + { + aAbs = rLibName; +#ifdef TRACE_CPLD + out( "> cpld takes path: \"" ); + out( aAbs ); +#endif + } + else { + if (osl_File_E_None != ::osl_getAbsolutePath( + aBaseDir.pData, rLibName.pData, &aAbs.pData )) + { + continue; + } #ifdef TRACE_CPLD out( "> cpld found path: \"" ); out( aBaseDir ); @@ -305,28 +320,33 @@ static oslModule loadModule( const OUString & rLibName, sal_Int32 nMode ) out( "\" => \"" ); out( aAbs ); #endif - if (0 == aAbs.indexOf( aBaseDir )) // still part of it? - { - // load from absolute path - oslModule lib = ::osl_loadModule( aAbs.pData, nMode ); + } + + if (0 == aAbs.indexOf( aBaseDir )) // still part of it? + { + // load from absolute path + oslModule lib = ::osl_loadModule( aAbs.pData, nMode ); #ifdef TRACE_CPLD - out( lib ? "\" ...loaded!\n" : "\" ...loading failed!\n" ); + out( lib ? "\" ...loaded!\n" : "\" ...loading failed!\n" ); #endif - return lib; - } + return lib; + } #ifdef TRACE_CPLD - else - { - out( "\" ...does not match given path.\n" ); - } -#endif + else + { + out( "\" ...does not match given path \"" ); + out( aBaseDir ); + out( "\".\n" ); } +#endif } return 0; } - - // no path set - return ::osl_loadModule( rLibName.pData, nMode ); + else + { + // no path set + return ::osl_loadModule( rLibName.pData, nMode ); + } } //************************************************************************* |