		public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
	    throws IOException {
	        String filename = file.getFileName().toString();
	        if(filename.endsWith(WikiManager.WIKI_PROPERTIES_SUFFIX)) {
	        		String f = convertAlternativeFilename(file.toString());
	        		final Path destFile = Paths.get(wikiDir.toString(), f);
	        		resetAndCopyProperties(file, destFile);
	        } else if (filename.endsWith(WIKI_FILE_SUFFIX)) {
        			String f = convertAlternativeFilename(file.toString());
	        		final Path destFile = Paths.get(wikiDir.toString(), f);
				Files.copy(file, destFile, StandardCopyOption.REPLACE_EXISTING);
			} else if (!filename.contains(WIKI_FILE_SUFFIX + "-")
					&& !filename.contains(WIKI_PROPERTIES_SUFFIX + "-")) {
				final Path destFile = Paths.get(mediaDir.toString(), file.toString());
				Files.copy(file, destFile, StandardCopyOption.REPLACE_EXISTING);
			}
	        return FileVisitResult.CONTINUE;
		}
The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.