Commits

Anonymous committed 70478b3

Fixed bug in ScanDIRResource.java

Comments (0)

Files changed (1)

plugin-resources/webapp/xnat/java/org/nrg/xnat/restlet/resources/ScanDIRResource.java

 				FileUtils.copyFileToDirectory(f,tmp_dicom_dir);
 				File tmp_dicom_file = new File(tmp_dicom_dir,f.getName());
 				logger.error("Adding file :" + tmp_dicom_file.getCanonicalFile());
-				dicomdir.addFile(tmp_dicom_file);
+				dicomdir.addFile(tmp_dicom_dir);
 				// delete the file now to avoid buildup.
 				tmp_dicom_file.delete();
 			    } 
 	    }
 	    
 	    //	    FileUtils.deleteDirectory(tmp_working_dir);
+	    dicomdir.close();
 	    rep.addEntry("DICOMDIR", dicomDIRFile);
 	    this.setContentDisposition(String.format("attachment; filename=\"%s\";",rep.getDownloadName()));