Kaydet (Commit) dc2fe18e authored tarafından Michael Stahl's avatar Michael Stahl

fdo#43895 lp#905355: fix the fix so it doesn't crash

rtl::OUString rtl::OUString::copy(sal_Int32) const: Assertion
`beginIndex >= 0 && beginIndex <= getLength()' failed.
(regression from dd2fe95c)
üst d564c79e
......@@ -1641,8 +1641,17 @@ void FileDialogHelper_Impl::getRealFilter( String& _rFilter ) const
void FileDialogHelper_Impl::verifyPath()
{
#ifdef UNX
static char const s_FileScheme[] = "file://";
if (0 != rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength(
maPath.getStr(), maPath.getLength(),
s_FileScheme, RTL_CONSTASCII_LENGTH(s_FileScheme)))
{
return;
}
const OString sFullPath = OUStringToOString(
maPath.copy(RTL_CONSTASCII_LENGTH(s_FileScheme)) + maFileName,
osl_getThreadTextEncoding() );
struct stat aFileStat;
const OString sFullPath = OUStringToOString( maPath.copy(RTL_CONSTASCII_LENGTH("file://")) + maFileName, osl_getThreadTextEncoding() );
stat( sFullPath.getStr(), &aFileStat );
// lp#905355, fdo#43895
// Check that the file has read only permission and is in /tmp -- this is
......
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