equal
deleted
inserted
replaced
188 } |
188 } |
189 if (uri.getFragment() != null) { |
189 if (uri.getFragment() != null) { |
190 throw new IllegalArgumentException("Fragment component present"); |
190 throw new IllegalArgumentException("Fragment component present"); |
191 } |
191 } |
192 String path = uri.getPath(); |
192 String path = uri.getPath(); |
193 if (path == null || path.charAt(0) != '/') { |
193 if (path == null || path.charAt(0) != '/' || path.contains("..")) { |
194 throw new IllegalArgumentException("Invalid path component"); |
194 throw new IllegalArgumentException("Invalid path component"); |
195 } |
195 } |
196 return getTheFileSystem().getPath(path); |
196 |
|
197 return getTheFileSystem().getPath("/modules" + path); |
197 } |
198 } |
198 |
199 |
199 private FileSystem getTheFileSystem() { |
200 private FileSystem getTheFileSystem() { |
200 checkPermission(); |
201 checkPermission(); |
201 FileSystem fs = this.theFileSystem; |
202 FileSystem fs = this.theFileSystem; |