Mercurial > dive4elements > framework
comparison artifacts-common/src/main/java/de/intevation/artifacts/common/utils/FileTools.java @ 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 | a2efc9d65a11 |
children | 5c07601fe60e |
comparison
equal
deleted
inserted
replaced
455:30cdaa190c32 | 456:afbe26bb9895 |
---|---|
88 } | 88 } |
89 | 89 |
90 curr = null; | 90 curr = null; |
91 OUTER: while (!parts.isEmpty()) { | 91 OUTER: while (!parts.isEmpty()) { |
92 String f = parts.pop(); | 92 String f = parts.pop(); |
93 log.debug("fixing: '" + f + "'"); | 93 if (f.equals(".") || f.equals("..")) { |
94 // No need to fix . or .. | |
95 continue; | |
96 } | |
94 if (curr == null) { | 97 if (curr == null) { |
95 // XXX: Not totaly correct because there | 98 // XXX: Not totaly correct because there |
96 // more than one root on none unix systems. | 99 // more than one root on none unix systems. |
97 for (File root: File.listRoots()) { | 100 for (File root: File.listRoots()) { |
98 File [] files = root.listFiles(); | 101 File [] files = root.listFiles(); |