diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-08-09 13:13:40 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-08-09 16:57:00 +0200 |
commit | bab5511870e8ad847020645628df8090116f0e8b (patch) | |
tree | 743b2407eba74a90952e9356be1e2041e400d345 /sfx2 | |
parent | f25c985b768059ac11b1c73ef6116e767bc409c7 (diff) |
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>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/qa/cppunit/test_misc.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sfx2/qa/cppunit/test_misc.cxx b/sfx2/qa/cppunit/test_misc.cxx index 7162dfc58581..9c21ae95d704 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)); |