You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by pg...@apache.org on 2002/10/12 21:23:19 UTC
cvs commit: jakarta-james/src/java/org/apache/james/nntpserver/repository NNTPSpooler.java
pgoldstein 2002/10/12 12:23:19
Modified: src/java/org/apache/james/nntpserver/repository
NNTPSpooler.java
Log:
Fixed a minor bug.
With the unification of the File lookup code in AvalonContextUtilities, a couple of lines used
to ensure creation of the directory on startup were deleted. These lines have been moved to
initialize() in the NNTPSpooler.
Revision Changes Path
1.10 +10 -3 jakarta-james/src/java/org/apache/james/nntpserver/repository/NNTPSpooler.java
Index: NNTPSpooler.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/nntpserver/repository/NNTPSpooler.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- NNTPSpooler.java 4 Oct 2002 08:17:49 -0000 1.9
+++ NNTPSpooler.java 12 Oct 2002 19:23:19 -0000 1.10
@@ -85,6 +85,16 @@
try {
spoolPath = AvalonContextUtilities.getFile(context, spoolPathString);
+ if ( spoolPath.exists() == false ) {
+ spoolPath.mkdirs();
+ } else if (!(spoolPath.isDirectory())) {
+ StringBuffer errorBuffer =
+ new StringBuffer(128)
+ .append("Spool directory is improperly configured. The specified path ")
+ .append(spoolPathString)
+ .append(" is not a directory.");
+ throw new ConfigurationException(errorBuffer.toString());
+ }
} catch (Exception e) {
getLogger().fatalError(e.getMessage(), e);
throw e;
@@ -132,9 +142,6 @@
* @return the spool directory
*/
File getSpoolPath() {
- if ( spoolPath.exists() == false ) {
- spoolPath.mkdirs();
- }
return spoolPath;
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>