466005 Throw exception if rename during Part.write(filename) fails

This commit is contained in:
Jan Bartel 2015-05-01 16:39:22 +10:00
parent be3b9497a6
commit aaf7a56a27
1 changed files with 2 additions and 0 deletions

View File

@ -275,6 +275,8 @@ public class MultiPartInputStreamParser
File f = new File(_tmpDir, fileName);
if (_file.renameTo(f))
_file = f;
else
throw new IOException("Part rename failure: from "+_file.getName()+" to "+fileName + " in "+_tmpDir.getAbsolutePath());
}
}