Index: assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java =================================================================== --- assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java (revision 37706) +++ assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java (working copy) @@ -9910,8 +9910,7 @@ byte[] buffer = new byte[4096]; - File f = new File(fName); - f.getParentFile().mkdirs(); + File f = File.createTempFile("asgnup", "tmp"); FileOutputStream fout = new FileOutputStream(f); int len; @@ -9929,6 +9928,7 @@ fc.read(bb); //remove the file + fc.close(); // The file channel needs to be closed before the deletion. f.delete(); return data;