From 336e04496fa06cef99351692d60b2618c969d787 Mon Sep 17 00:00:00 2001 From: Zolnai Tamás Date: Sat, 13 Apr 2013 09:23:16 +0200 Subject: Some empty pot directories remained Change-Id: I5aedd4595c3f676deaedddf80c3a96250015f2ed --- l10ntools/source/localize.cxx | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'l10ntools') diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx index 8bdec4191e73..cc1e1de93964 100644 --- a/l10ntools/source/localize.cxx +++ b/l10ntools/source/localize.cxx @@ -284,19 +284,6 @@ void handleFilesOfDir( } } } - //Remove empty pot directories - OUString sPoPath = - OStringToOUString( - rPotDir.copy(0,rPotDir.lastIndexOf('/')), RTL_TEXTENCODING_UTF8); - OUString sPoUrl; - if (osl::FileBase::getFileURLFromSystemPath(sPoPath, sPoUrl) - != osl::FileBase::E_None) - { - cerr << "Error: Cannot convert pathname to URL in " << __FILE__ << ", in line " << __LINE__ << "\n" - << OUStringToOString(sPoPath, RTL_TEXTENCODING_UTF8).getStr() << "\n"; - throw false; //TODO - } - osl::Directory::remove(sPoUrl); } bool includeProject(const OString& rProject) { @@ -444,6 +431,20 @@ void handleDirectory( cerr << "Error: Cannot close directory\n"; throw false; //TODO } + + //Remove empty pot directory + OUString sPoPath = + OStringToOUString( + rPotDir.copy(0,rPotDir.lastIndexOf('/')), RTL_TEXTENCODING_UTF8); + OUString sPoUrl; + if (osl::FileBase::getFileURLFromSystemPath(sPoPath, sPoUrl) + != osl::FileBase::E_None) + { + cerr << "Error: Cannot convert pathname to URL in " << __FILE__ << ", in line " << __LINE__ << "\n" + << OUStringToOString(sPoPath, RTL_TEXTENCODING_UTF8).getStr() << "\n"; + throw false; //TODO + } + osl::Directory::remove(sPoUrl); } void handleProjects(char * sSourceRoot, char const * sDestRoot) -- cgit