[Dive4elements-commits] [PATCH] Do not try to look for . and .. while fixing paths

Wald Commits scm-commit at wald.intevation.org
Fri Mar 1 12:08:03 CET 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1362135745 -3600
# Node ID afbe26bb9895f68885a619f07e1a6e6a0aa3fbf3
# Parent  30cdaa190c327219e10a8f8ddd8e8206f2648d9a
Do not try to look for . and .. while fixing paths

diff -r 30cdaa190c32 -r afbe26bb9895 artifacts-common/src/main/java/de/intevation/artifacts/common/utils/FileTools.java
--- 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.


More information about the Dive4elements-commits mailing list