summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-08-09 13:13:40 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2018-08-10 14:37:44 +0200
commit7861689c420f38223b8d53dd6911728ea7f26395 (patch)
tree26e7e16b581d8533f99a8cd3e6750a839eceea88
parenttdf#119136 GetPropertyFromStyleSheet infinite loop (diff)
downloadcore-7861689c420f38223b8d53dd6911728ea7f26395.tar.gz
core-7861689c420f38223b8d53dd6911728ea7f26395.zip
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@redhat.com> (cherry picked from commit bab5511870e8ad847020645628df8090116f0e8b) Reviewed-on: https://gerrit.libreoffice.org/58778 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--sfx2/qa/cppunit/test_misc.cxx4
1 files changed, 3 insertions, 1 deletions
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));