Kaydet (Commit) 63e1596a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Report osl::Directory::createPath failure

Change-Id: I75ede7f03edf80c00d33281afdebc3b620fb33eb
üst 7aaa3fe5
...@@ -70,7 +70,15 @@ void ScreenshotTest::implSaveScreenshot(const Bitmap& rScreenshot, const OString ...@@ -70,7 +70,15 @@ void ScreenshotTest::implSaveScreenshot(const Bitmap& rScreenshot, const OString
aDirname = m_aScreenshotDirectory + "/" + aDirname + aDirname = m_aScreenshotDirectory + "/" + aDirname +
( (maCurrentLanguage == "en-US") ? OUString() : "/" + maCurrentLanguage ); ( (maCurrentLanguage == "en-US") ? OUString() : "/" + maCurrentLanguage );
osl::Directory::createPath(m_directories.getURLFromWorkdir(OUStringToOString(aDirname,RTL_TEXTENCODING_UTF8).getStr())); auto const path = m_directories.getURLFromWorkdir(
OUStringToOString(aDirname, RTL_TEXTENCODING_UTF8).getStr());
auto const e = osl::Directory::createPath(path);
if (e != osl::FileBase::E_EXIST) {
CPPUNIT_ASSERT_EQUAL_MESSAGE(
OUStringToOString(
"Failed to create " + path, RTL_TEXTENCODING_UTF8).getStr(),
osl::FileBase::E_None, e);
}
OUString aFullPath = m_directories.getPathFromWorkdir(OUStringToOString(aDirname + "/" + aBasename + ".png",RTL_TEXTENCODING_UTF8).getStr()); OUString aFullPath = m_directories.getPathFromWorkdir(OUStringToOString(aDirname + "/" + aBasename + ".png",RTL_TEXTENCODING_UTF8).getStr());
SvFileStream aNew(aFullPath, StreamMode::WRITE | StreamMode::TRUNC); SvFileStream aNew(aFullPath, StreamMode::WRITE | StreamMode::TRUNC);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment