src/main/java/com/atlassian/uwc/converters/mediawiki/AttachmentConverter.java [40:83]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    	Vector soughtAttachments = getSoughtAttachmentNames(page);
    	if (soughtAttachments == null || soughtAttachments.size() == 0)
    		 return;
    	
    	//get filelist from the attachment directory
    	log.debug("Examining File Directory");
        File attachmentPageDir = new File(attachmentDir);
        File files[] = attachmentPageDir.listFiles();
        if (files==null) {
            log.info("no attachment files found in directory: "+attachmentDir);
            return;
        }
        
        // add sought after attachments. This is a recursive method.
        log.debug("Attaching files to page");
        addAttachments(page, files, soughtAttachments);
    }

	/**
	 * recursively look through the images directory for the desired files
	 * and attach them to the given page
	 * @param page object files will be attached to
	 * @param files Array of a directory's files
	 * @param soughtFilenames filenames we are looking to attach
	 */
	private void addAttachments(Page page, File[] files, Vector soughtFilenames) {
		for (File file : files) {
			//check for existence
            if (!file.exists()) continue;
            //check for recursion
            if (file.isDirectory()) {
            	File moreFiles[] = file.listFiles();
            	if (moreFiles == null)
            		continue;
            	addAttachments(page, moreFiles, soughtFilenames);
            	continue;
            }
            //existing non-Directory file?
            String filename = file.getName();
            //is it a file we want to attach?
            if (foundFile(soughtFilenames, filename)) {
            	//attach the file
	            log.debug("adding attachment: " + file.getName());
	            page.addAttachment(file);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/com/atlassian/uwc/converters/vqwiki/AttachmentConverter.java [84:127]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	    	Vector soughtAttachments = getSoughtAttachmentNames(page);
	    	if (soughtAttachments == null || soughtAttachments.size() == 0)
	    		 return;
	    	
	    	//get filelist from the attachment directory
	    	log.debug("Examining File Directory");
	        File attachmentPageDir = new File(attachmentDir);
	        File files[] = attachmentPageDir.listFiles();
	        if (files==null) {
	            log.info("no attachment files found in directory: "+attachmentDir);
	            return;
	        }
	        
	        // add sought after attachments. This is a recursive method.
	        log.debug("Attaching files to page");
	        addAttachments(page, files, soughtAttachments);
	    }

		/**
		 * recursively look through the images directory for the desired files
		 * and attach them to the given page
		 * @param page object files will be attached to
		 * @param files Array of a directory's files
		 * @param soughtFilenames filenames we are looking to attach
		 */
		private void addAttachments(Page page, File[] files, Vector soughtFilenames) {
			for (File file : files) {
				//check for existence
	            if (!file.exists()) continue;
	            //check for recursion
	            if (file.isDirectory()) {
	            	File moreFiles[] = file.listFiles();
	            	if (moreFiles == null)
	            		continue;
	            	addAttachments(page, moreFiles, soughtFilenames);
	            	continue;
	            }
	            //existing non-Directory file?
	            String filename = file.getName();
	            //is it a file we want to attach?
	            if (foundFile(soughtFilenames, filename)) {
	            	//attach the file
		            log.debug("adding attachment: " + file.getName());
		            page.addAttachment(file);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



