Author: ningjiang
Date: Wed Dec 22 07:33:50 2010
New Revision: 1051780
URL: http://svn.apache.org/viewvc?rev=1051780&view=rev
Log:
Merged revisions 1049426 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1049426 | dkulp | 2010-12-15 12:55:14 +0800 (Wed, 15 Dec 2010) | 1 line
[CXF-1924] make sure the tmp dir is writable as well
........
Modified:
cxf/branches/2.3.x-fixes/ (props changed)
cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec 22 07:33:50 2010
@@ -1 +1 @@
-/cxf/trunk:1041183,1041790,1041993,1042346,1042571,1042724,1042805,1042821,1043225,1043229,1043902,1043907,1043954,1044085,1044238-1044305,1045024,1048915,1048919,1048930,1049078,1049937,1050005,1050021,1050095,1050102,1050113,1050156,1050165,1050280,1051115,1051613
+/cxf/trunk:1041183,1041790,1041993,1042346,1042571,1042724,1042805,1042821,1043225,1043229,1043902,1043907,1043954,1044085,1044238-1044305,1045024,1048915,1048919,1048930,1049078,1049426,1049937,1050005,1050021,1050095,1050102,1050113,1050156,1050165,1050280,1051115,1051613
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java?rev=1051780&r1=1051779&r2=1051780&view=diff
==============================================================================
---
cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java
(original)
+++
cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java
Wed Dec 22 07:33:50 2010
@@ -64,12 +64,18 @@ public final class FileUtils {
int x = (int)(Math.random() * 1000000);
s = System.getProperty("java.io.tmpdir");
File checkExists = new File(s);
- if (!checkExists.exists()) {
+ if (!checkExists.exists() || !checkExists.isDirectory()) {
throw new RuntimeException("The directory "
+ checkExists.getAbsolutePath()
+ " does not exist, please set
java.io.tempdir"
+ " to an existing directory");
}
+ if (!checkExists.canWrite()) {
+ throw new RuntimeException("The directory "
+ + checkExists.getAbsolutePath()
+ + " is now writable, please set
java.io.tempdir"
+ + " to an writable directory");
+ }
File f = new File(s, "cxf-tmp-" + x);
while (!f.mkdir()) {
x = (int)(Math.random() * 1000000);