[Libreoffice-commits] .: l10ntools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 20 12:07:20 PST 2012
l10ntools/source/renewpo.cxx | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
New commits:
commit b420358033faf43ceabb38418902cecffd1c643c
Author: David Ostrovsky <david at ostrovsky.org>
Date: Tue Nov 20 21:06:25 2012 +0100
WaE ignoring return value
Change-Id: I3a8fa34eb739e4595f8a9d279e33b9191adc2443
diff --git a/l10ntools/source/renewpo.cxx b/l10ntools/source/renewpo.cxx
index a9f3321..4c236ef 100644
--- a/l10ntools/source/renewpo.cxx
+++ b/l10ntools/source/renewpo.cxx
@@ -84,11 +84,16 @@ void HandleLanguage(struct dirent* pLangEntry, const OString& rOldPath,
}
const OString SDFFileName =
OUStringToOString(aTempPath, RTL_TEXTENCODING_UTF8);
- system( (rpo2loPath +
+ const char* cmd = (rpo2loPath +
" -i " + rOldPath + "/" + LangEntryName +
" -o " + SDFFileName +
" -l " + LangEntryName +
- " -t " + rSDFPath).getStr());
+ " -t " + rSDFPath).getStr();
+ if (system(cmd) != 0)
+ {
+ std::cerr << "Error: Failed to execute " << cmd << '\n';
+ throw false;
+ }
cout << "Language sdf is ready!" << endl;
//Store info for po entries
@@ -136,7 +141,13 @@ void HandleLanguage(struct dirent* pLangEntry, const OString& rOldPath,
const OString sNewPoFileName =
GetPath(rNewPath + "/" +LangEntryName,pActInfo->second.first) +
".po";
- system(("mkdir -p " + sNewPoFileName.copy(0,sNewPoFileName.lastIndexOf("/"))).getStr());
+ const char* cmd2 = ("mkdir -p " + sNewPoFileName.copy(0,sNewPoFileName.lastIndexOf("/"))).getStr();
+ if (system(cmd2) != 0)
+ {
+ std::cerr << "Error: Failed to execute " << cmd2 << '\n';
+ throw false;
+ }
+
aNewPo.open(sNewPoFileName);
if (!aNewPo.isOpen())
{
More information about the Libreoffice-commits
mailing list