[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sfx2/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Aug 10 12:38:09 UTC 2018


 sfx2/qa/cppunit/test_misc.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 7861689c420f38223b8d53dd6911728ea7f26395
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Aug 9 13:13:40 2018 +0200
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Fri Aug 10 14:37:44 2018 +0200

    Set umask /before/ using it
    
    The test used to fail when umask originally was e.g. 077.
    
    Change-Id: I21d346532698feebccc8bb3f6cb9a9dd3002a20e
    Reviewed-on: https://gerrit.libreoffice.org/58757
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit bab5511870e8ad847020645628df8090116f0e8b)
    Reviewed-on: https://gerrit.libreoffice.org/58778
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/sfx2/qa/cppunit/test_misc.cxx b/sfx2/qa/cppunit/test_misc.cxx
index b7c17a0e1cf3..d74687b25431 100644
--- a/sfx2/qa/cppunit/test_misc.cxx
+++ b/sfx2/qa/cppunit/test_misc.cxx
@@ -119,6 +119,9 @@ void MiscTest::testNoThumbnail()
     CPPUNIT_ASSERT(xComponent.is());
 
     // Save it with the NoThumbnail option and assert that it has no thumbnail.
+#ifndef _WIN32
+    mode_t nMask = umask(022);
+#endif
     uno::Reference<frame::XStorable> xStorable(xComponent, uno::UNO_QUERY);
     CPPUNIT_ASSERT(xStorable.is());
     utl::TempFile aTempFile;
@@ -132,7 +135,6 @@ void MiscTest::testNoThumbnail()
 
 #ifndef _WIN32
     // Check permissions of the URL after store.
-    mode_t nMask = umask(022);
     osl::DirectoryItem aItem;
     CPPUNIT_ASSERT_EQUAL(osl::DirectoryItem::E_None,
                          osl::DirectoryItem::get(aTempFile.GetURL(), aItem));


More information about the Libreoffice-commits mailing list