]> WPIA git - gigi.git/blobdiff - util/org/cacert/gigi/util/FetchLocales.java
Fix: exceptional resource leaks.
[gigi.git] / util / org / cacert / gigi / util / FetchLocales.java
index 87beaacef16fa53275f2771e2e60a96f44f7fe05..21a789f3342c8757f03e95d047123841ad744f6d 100644 (file)
@@ -35,7 +35,9 @@ public class FetchLocales {
     public static void main(String[] args) throws IOException, ParserConfigurationException, TransformerException {
         System.out.println("downloading locales ...");
         File locale = new File("locale");
-        locale.mkdir();
+        if ( !locale.mkdir()) {
+            throw new IOException("Could not create locales directory.");
+        }
 
         DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
         DocumentBuilder db = dbf.newDocumentBuilder();