summaryrefslogtreecommitdiff
path: root/l10ntools/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-02-09 09:08:30 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-02-09 09:08:30 +0000
commit80ba5e7aa6935ce1966a087992ae4d13bb90a05b (patch)
treede15c42ca326ebb6f61471d20e1ba7070eba2841 /l10ntools/source
parent97fdf02f648a042d10535b0d8a71d2c69154d037 (diff)
convert system path to url
otherwise seg faults in building nlpsolver
Diffstat (limited to 'l10ntools/source')
-rw-r--r--l10ntools/source/xmlparse.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index c21d9e526132..f44b6f4e672b 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -1123,12 +1123,20 @@ XMLFile *SimpleXMLParser::Execute( const rtl::OUString &rFullFileName , const rt
RTL_CONSTASCII_USTRINGPARAM("ERROR: Unable to open file "));
aErrorInformation.sMessage += rFileName;
+ rtl::OUString aFileURL;
+ if (osl::File::getFileURLFromSystemPath(rFileName, aFileURL)
+ != osl::File::E_None)
+ {
+ return 0;
+ }
+
oslFileHandle h;
- if (osl_openFile(rFileName.pData, &h, osl_File_OpenFlag_Read)
+ if (osl_openFile(aFileURL.pData, &h, osl_File_OpenFlag_Read)
!= osl_File_E_None)
{
return 0;
}
+
sal_uInt64 s;
oslFileError e = osl_getFileSize(h, &s);
void * p;