[Libreoffice-commits] core.git: l10ntools/source

Zolnai Tamás zolnaitamas2000 at gmail.com
Sat Apr 13 02:09:50 PDT 2013


 l10ntools/source/localize.cxx |   27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

New commits:
commit 336e04496fa06cef99351692d60b2618c969d787
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Sat Apr 13 09:23:16 2013 +0200

    Some empty pot directories remained
    
    Change-Id: I5aedd4595c3f676deaedddf80c3a96250015f2ed

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 8bdec41..cc1e1de 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)


More information about the Libreoffice-commits mailing list