changeset 8677:b44c76b6800c

Importer, do not jump knowingly over the cliff.
author Tom Gottfried <tom@intevation.de>
date Thu, 09 Apr 2015 19:27:54 +0200
parents 571c0e4321bd
children b743ed33c65d
files backend/src/main/java/org/dive4elements/river/importer/parsers/InfoGewParser.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/InfoGewParser.java	Thu Apr 09 18:20:55 2015 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/InfoGewParser.java	Thu Apr 09 19:27:54 2015 +0200
@@ -117,11 +117,11 @@
                         wst = new File(root, wstFilename);
                     }
                     wst = FileTools.repair(wst);
-                    log.info("Found wst file '" + wst + "'");
                     if (!wst.isFile() || !wst.canRead()) {
                         log.error("cannot access WST file '" + wstFilename + "'");
                         continue;
                     }
+                    log.info("Found wst file '" + wst + "'");
                     wstFile = wst;
                 }
                 else if ((m = GEW_UUID.matcher(line)).matches()) {
@@ -135,7 +135,7 @@
                     bbInfoFile = new File(normalize(bbInfo));
                 }
             }
-            if (riverName != null) {
+            if (riverName != null && wstFile != null) {
                 rivers.add(new ImportRiver(
                     riverName,
                     modelUuid,

http://dive4elements.wald.intevation.org