From aaf7a56a27e4e3e36ca13c73aa4f57a132335b06 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Fri, 1 May 2015 16:39:22 +1000 Subject: [PATCH] 466005 Throw exception if rename during Part.write(filename) fails --- .../java/org/eclipse/jetty/util/MultiPartInputStreamParser.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/MultiPartInputStreamParser.java b/jetty-util/src/main/java/org/eclipse/jetty/util/MultiPartInputStreamParser.java index c23a4d92f95..e4ef95df52e 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/MultiPartInputStreamParser.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/MultiPartInputStreamParser.java @@ -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()); } }