sal/qa/osl/security/osl_Security.cxx | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-)
New commits: commit bc9b86940a707e9e2e1076f2954f38075398b5d7 Author: Francois Tigeot <ftig...@wolfpond.org> Date: Wed May 11 13:48:17 2011 +0200 Remove the ::osl::Security getHomeDir() check It serves no useful purpose and breaks the build under some packaging systems such as pkgsrc. (Cherry-picked from <http://cgit.freedesktop.org/libreoffice/core/commit/?id=84d10c7cda75b58384d1bbcd4022c3056002813d>.) Signed-off-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx index 93fa96a..a90d2f0 100644 --- a/sal/qa/osl/security/osl_Security.cxx +++ b/sal/qa/osl/security/osl_Security.cxx @@ -197,30 +197,6 @@ namespace osl_Security }; // class getUserName - - /** testing the method: - inline sal_Bool SAL_CALL getHomeDir( ::rtl::OUString& strDirectory) const; - */ - class getHomeDir : public CppUnit::TestFixture - { - public: - sal_Bool bRes, bRes1; - - void getHomeDir_001( ) - { - ::osl::Security aSec; - ::rtl::OUString strHome; - bRes = aSec.getHomeDir( strHome ); - - CPPUNIT_ASSERT_MESSAGE( "#test comment#: getHomeDir and compare it with the info we get at the beginning.", - ( sal_True == strHomeDirectory.equals( strHome ) ) && ( sal_True == bRes ) ); - } - - CPPUNIT_TEST_SUITE( getHomeDir ); - CPPUNIT_TEST( getHomeDir_001 ); - CPPUNIT_TEST_SUITE_END( ); - }; // class getHomeDir - /** testing the method: inline sal_Bool Security::getConfigDir( rtl::OUString& strDirectory ) const */ @@ -341,7 +317,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION(osl_Security::ctors); CPPUNIT_TEST_SUITE_REGISTRATION(osl_Security::logonUser); CPPUNIT_TEST_SUITE_REGISTRATION(osl_Security::getUserIdent); CPPUNIT_TEST_SUITE_REGISTRATION(osl_Security::getUserName); -CPPUNIT_TEST_SUITE_REGISTRATION(osl_Security::getHomeDir); CPPUNIT_TEST_SUITE_REGISTRATION(osl_Security::getConfigDir); CPPUNIT_TEST_SUITE_REGISTRATION(osl_Security::isAdministrator); CPPUNIT_TEST_SUITE_REGISTRATION(osl_Security::getHandle); @@ -393,11 +368,8 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *, strUserName = ::rtl::OUString::createFromAscii( pw->pw_name ); /// get home directory; - char *pw_dir = pw->pw_dir; - if( getenv( "FAKEROOTKEY" ) ) - pw_dir = getenv("HOME"); CPPUNIT_ASSERT_MESSAGE( "#Convert from system path to URL failed.", - ::osl::File::E_None == ::osl::File::getFileURLFromSystemPath( ::rtl::OUString::createFromAscii( pw_dir ), strHomeDirectory ) ); + ::osl::File::E_None == ::osl::File::getFileURLFromSystemPath( ::rtl::OUString::createFromAscii( pw->pw_dir ), strHomeDirectory ) ); /// get config directory; strConfigDirectory = strHomeDirectory.copy(0); _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits