changeset 456:afbe26bb9895

Do not try to look for . and .. while fixing paths
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 01 Mar 2013 12:02:25 +0100
parents 30cdaa190c32
children 5c07601fe60e
files artifacts-common/src/main/java/de/intevation/artifacts/common/utils/FileTools.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/FileTools.java	Thu Jan 31 19:35:38 2013 +0100
+++ b/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/FileTools.java	Fri Mar 01 12:02:25 2013 +0100
@@ -90,7 +90,10 @@
         curr = null;
         OUTER: while (!parts.isEmpty()) {
             String f = parts.pop();
-            log.debug("fixing: '" + f + "'");
+            if (f.equals(".") || f.equals("..")) {
+                // No need to fix . or ..
+                continue;
+            }
             if (curr == null) {
                 // XXX: Not totaly correct because there
                 // more than one root on none unix systems.

http://dive4elements.wald.intevation.org