mirror of
https://github.com/apache/struts.git
synced 2026-08-07 23:57:03 +00:00
WW-3664 extends Dispatcher to create directory tree defined as struts.multipart.saveDir
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1439137 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -681,21 +681,20 @@ public class Dispatcher {
|
||||
File multipartSaveDir = new File(saveDir);
|
||||
|
||||
if (!multipartSaveDir.exists()) {
|
||||
if (!multipartSaveDir.mkdir()) {
|
||||
if (!multipartSaveDir.mkdirs()) {
|
||||
String logMessage;
|
||||
try {
|
||||
logMessage = "Could not find create multipart save directory '"+multipartSaveDir.getCanonicalPath()+"'.";
|
||||
} catch (IOException e) {
|
||||
logMessage = "Could not find create multipart save directory '"+multipartSaveDir.toString()+"'.";
|
||||
}
|
||||
if(devMode) {
|
||||
try {
|
||||
logMessage = "Could not find create multipart save directory '" + multipartSaveDir.getCanonicalPath() + "'.";
|
||||
} catch (IOException e) {
|
||||
logMessage = "Could not find create multipart save directory '" + multipartSaveDir.toString() + "'.";
|
||||
}
|
||||
if (devMode) {
|
||||
LOG.error(logMessage);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (LOG.isWarnEnabled()) {
|
||||
LOG.warn(logMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user