Author: andrei_exadel
Date: 2009-03-20 14:46:22 -0400 (Fri, 20 Mar 2009)
New Revision: 13082
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/startup/CopyImageStuff.java
Log:
Delete uploadRoot on startup
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/startup/CopyImageStuff.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/startup/CopyImageStuff.java 2009-03-20
18:45:58 UTC (rev 13081)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/startup/CopyImageStuff.java 2009-03-20
18:46:22 UTC (rev 13082)
@@ -85,9 +85,10 @@
String uploadRootPath = System.getProperty("java.io.tmpdir") +
REALWORLD_FOLDER + File.separator;
if (uploadRootPath != null) {
uploadRoot = new File(uploadRootPath);
- if (!uploadRoot.exists()) {
- uploadRoot.mkdir();
+ if (uploadRoot.exists()) {
+ FileUtils.deleteDirectory(uploadRoot);
}
+ uploadRoot.mkdir();
this.uploadRootPath = uploadRoot.getCanonicalPath();
}else {
throw new NullPointerException("Upload root was not created");
Show replies by date